Page 1 of 1

VAT Managing

Posted: Sun Sep 13, 2026 12:22 pm
by Leon42320
Hi There

It Will be helpful to automatically manage VAT (what i do now manually)
On the ‘New’ or ‘Edit’ operation screen, split the transaction and add an automated function to manage VAT with four (for France 0, 5.5, 10 & 20%) possible rates defined in the settings, assigning them to the relevant VAT category and sub-category depending on the selected rate.

Thanks

Re: VAT Managing

Posted: Sun Sep 13, 2026 12:52 pm
by Leon42320
I Ask chatGPT

It gave me the following results (in French)


Éléments C++ à ajouter dans l'interface UI (wxWidgets)Dans la boîte de dialogue de fractionnement, il convient d'ajouter un groupe de contrôles avec :Un menu déroulant wxChoice pour sélectionner le taux (ex: Exonéré 0%, Taux réduit 5.5%, Taux intermédiaire 10%, Taux normal 20%).Un bouton "Calculer TVA" qui applique la formule TTC $\rightarrow$ HT + TVA et génère la ligne de TVA associée.
Déclaration dans mmSplitDetailsDialog.h :
C++
// Contrôles UI pour l'automatisme TVA
wxChoice* m_choiceVatRate;
wxButton* m_btnApplyVAT;

// Évènement
void OnApplyVAT(wxCommandEvent& event);

3. Logique de calcul et création des sous-lignes (.cpp)Le calcul d'un montant HT à partir d'un montant TTC subit la formule :$$\text{Montant HT} = \frac{\text{Montant TTC}}{1 + \text{Taux TVA}}$$$$\text{Montant TVA} = \text{Montant TTC} - \text{Montant HT}$$Implémentation dans mmSplitDetailsDialog.cpp :

C++
void mmSplitDetailsDialog::OnApplyVAT(wxCommandEvent& event)
{
// 1. Récupération du taux sélectionné (ex: 20%, 10%, 5.5%)
double vatPercent = 0.0;
int sel = m_choiceVatRate->GetSelection();
switch (sel) {
case 1: vatPercent = 5.5; break;
case 2: vatPercent = 10.0; break;
case 3: vatPercent = 20.0; break;
default: vatPercent = 0.0; break;
}

if (vatPercent <= 0.0) return;

// 2. Récupération du montant total TTC saisi dans la ligne courante
double totalTTC = m_textAmount->GetValue(); // Montant saisi par l'utilisateur
if (totalTTC <= 0.0) return;

// 3. Calcul de la ventilation HT / TVA
double amountHT = totalTTC / (1.0 + (vatPercent / 100.0));
double amountVAT = totalTTC - amountHT;

// Arrondi monétaire à 2 décimales
amountHT = std::round(amountHT * 100.0) / 100.0;
amountVAT = std::round(amountVAT * 100.0) / 100.0;

// Ajustement de la ligne de dépense principale avec le montant HT
m_textAmount->SetValue(amountHT);

// 4. Ajout automatique de la ligne de fractionnement pour la TVA
Model_Category vatCategory = Model_Category::GetCategoryByName("TVA");
Model_Subcategory vatSubCategory = Model_Subcategory::GetSubcategoryByName(
wxString::Format("TVA %.1f%%", vatPercent)
);

// Création de l'élément d'agrégation split
Model_Splittransaction splitVat;
splitVat.CATEGID = vatCategory.CATEGID;
splitVat.SUBCATEGID = vatSubCategory.SUBCATEGID;
splitVat.SPLITTRANSAMOUNT = amountVAT;

// Ajout à la liste locale des splits et rafraîchissement du contrôle wxListCtrl
m_splitList.push_back(splitVat);
UpdateSplitListControl();
}


My competencies and softwares don't allow me to do that :(

Could anyone with the correct skill give commentaries ?

Thanks

Re: VAT Managing

Posted: Sun Sep 13, 2026 4:10 pm
by alfred07380
As far as I’m concerned, MMEX is and should remain a personal finance programme.
So, no VAT management and certainly no integration of electronic invoicing (as you requested in another post).
There are specialised programmes for that. And they’re open source. For example, Dolibarr.
I’m not an MMEX developer. So I’m curious to hear the developers’ views.
Oh, and I am a french people.

Re: VAT Managing

Posted: Sun Sep 13, 2026 8:27 pm
by Renato
As far as I’m concerned, MMEX is and should remain a personal finance programme.
That's my (personal) opinion, too.

I keep noticing that users sometimes make very demanding requests of our developers regarding their very personal interests.
Sure, this sometimes leads to some very interesting new features.
However, developers make sure to include only those features that the majority of users want or need.