From fefd9d066e3e4565419b381d234e56c6a68ee00a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Feb 2008 12:25:21 +0000 Subject: [PATCH] Suite rapport TVA --- htdocs/compta/tva/clients.php | 8 ++--- htdocs/compta/tva/quadri_detail.php | 51 ++++++++++++++++------------- htdocs/langs/en_US/compta.lang | 24 ++++++++------ htdocs/langs/fr_FR/compta.lang | 9 +++-- 4 files changed, 52 insertions(+), 40 deletions(-) diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 0d0c0167dbf..065a2e47e11 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -93,12 +93,12 @@ if ($modetax==1) // Caluclate on invoice for goods and services $productcust=$langs->trans("Description"); $amountcust=$langs->trans("AmountHT"); $vatcust=$langs->trans("VATReceived"); - if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatcust.=' ('.$langs->trans("VATToPay").')'; + if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatcust.=' ('.$langs->trans("ToPay").')'; $elementsup=$langs->trans("SuppliersInvoices"); $productsup=$langs->trans("Description"); $amountsup=$langs->trans("AmountHT"); $vatsup=$langs->trans("VATPayed"); - if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatsup.=' ('.$langs->trans("VATToCollect").')'; + if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatsup.=' ('.$langs->trans("ToGetBack").')'; } if ($modetax==0) // Invoice for goods, payment for services { @@ -116,12 +116,12 @@ if ($modetax==0) // Invoice for goods, payment for services $productcust=$langs->trans("Description"); $amountcust=$langs->trans("AmountHT"); $vatcust=$langs->trans("VATReceived"); - if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatcust.=' ('.$langs->trans("VATToPay").')'; + if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatcust.=' ('.$langs->trans("ToPay").')'; $elementsup=$langs->trans("SuppliersInvoices"); $productsup=$langs->trans("Description"); $amountsup=$langs->trans("AmountHT"); $vatsup=$langs->trans("VATPayed"); - if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatsup.=' ('.$langs->trans("VATToCollect").')'; + if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatsup.=' ('.$langs->trans("TogetBack").')'; } report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index 2f2ba536b91..b8f9f3a1901 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -97,12 +97,12 @@ if ($modetax==1) // Caluclate on invoice for goods and services $productcust=$langs->trans("ProductOrService"); $amountcust=$langs->trans("AmountHT"); $vatcust=$langs->trans("VATReceived"); - if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatcust.=' ('.$langs->trans("VATToPay").')'; + if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatcust.=' ('.$langs->trans("ToPay").')'; $elementsup=$langs->trans("SuppliersInvoices"); $productsup=$langs->trans("ProductOrService"); $amountsup=$langs->trans("AmountHT"); $vatsup=$langs->trans("VATPayed"); - if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatsup.=' ('.$langs->trans("VATToCollect").')'; + if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatsup.=' ('.$langs->trans("ToGetBack").')'; } if ($modetax==0) // Invoice for goods, payment for services { @@ -126,12 +126,12 @@ if ($modetax==0) // Invoice for goods, payment for services $productcust=$langs->trans("ProductOrService"); $amountcust=$langs->trans("AmountHT"); $vatcust=$langs->trans("VATReceived"); - if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatcust.=' ('.$langs->trans("VATToPay").')'; + if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatcust.=' ('.$langs->trans("ToPay").')'; $elementsup=$langs->trans("SuppliersInvoices"); $productsup=$langs->trans("ProductOrService"); $amountsup=$langs->trans("AmountHT"); $vatsup=$langs->trans("VATPayed"); - if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatsup.=' ('.$langs->trans("VATToCollect").')'; + if ($conf->global->FACTURE_TVAOPTION != 'franchise') $vatsup.=' ('.$langs->trans("ToGetBack").')'; } report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); @@ -141,14 +141,11 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl echo ''; $y = $year_current; - -$total = 0; $subtotal = 0; +$total = 0; +$subtotal = 0; $i=0; -$subtot_coll_total = 0; -$subtot_coll_vat = 0; -$subtot_paye_total = 0; -$subtot_paye_vat = 0; +// Load arrays of datas $x_coll = vat_by_quarter($db, $y, $q, $modetax, 'sell'); $x_paye = vat_by_quarter($db, $y, $q, $modetax, 'buy'); @@ -243,13 +240,16 @@ print ''; if ($modetax == 0) { print ''; - print ''; + print ''; } print ''; print ''; print ''; foreach(array_keys($x_coll) as $rate) { + $subtot_coll_total_ht = 0; + $subtot_coll_vat = 0; + if (is_array($x_both[$rate]['coll']['detail'])) { $var=true; @@ -260,7 +260,9 @@ foreach(array_keys($x_coll) as $rate) { $var=!$var; print ''; + // Ref print ''; + //Description print ''; + print dolibarr_trunc($fields['descr'],16).''; // Amount line if ($modetax == 0) { @@ -318,9 +320,9 @@ foreach(array_keys($x_coll) as $rate) print ''; print ''; - $subtot_coll_total += $temp_ht; - $subtot_coll_vat += $temp_vat; - $x_coll_sum += $temp_vat; + $subtot_coll_total_ht += $temp_ht; + $subtot_coll_vat += $temp_vat; + $x_coll_sum += $temp_vat; } } print ''; @@ -331,7 +333,7 @@ foreach(array_keys($x_coll) as $rate) print ''; print ''; } - print ''; + print ''; print ''; print ''; } @@ -354,6 +356,9 @@ print ''; print ''."\n"; foreach(array_keys($x_paye) as $rate) { + $subtot_paye_total_ht = 0; + $subtot_paye_vat = 0; + if(is_array($x_both[$rate]['paye']['detail'])) { $var=true; @@ -422,9 +427,9 @@ foreach(array_keys($x_paye) as $rate) print ''; print ''; - $subtot_paye_total += $temp_ht; - $subtot_paye_vat += $temp_vat; - $x_paye_sum += $temp_vat; + $subtot_paye_total_ht += $temp_ht; + $subtot_paye_vat += $temp_vat; + $x_paye_sum += $temp_vat; } } @@ -436,18 +441,18 @@ foreach(array_keys($x_paye) as $rate) print ''; print ''; } - print ''; + print ''; print ''; print ''; } +print ''; + print ''; -print ''; +print ''; print ''."\n"; $diff = $x_coll_sum - $x_paye_sum; -//$total = $total + $diff; -//$subtotal = $subtotal + $diff; print ""; print ''; print '\n"; diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 68ac5498573..473657a9de0 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -8,7 +8,6 @@ OptionModeTrue=Option Input-Ouput OptionModeVirtual=Option Credits-Debits OptionModeTrueDesc=In this context, the turnover is calculated over paiements (date of payments). \nThe validity of the figures is assured only if the book-keeping is scrutinized through the input/output on the accounts via invoices. OptionModeVirtualDesc=In this context, the turnover is calculated over invoices (date of validation). When these invoices are due, whether they have been paid or not, they are listed in the turnover output. -VATReportDesc=This report sows VAT received and payed. FeatureIsSupportedInInOutModeOnly=Feature only available in CREDITS-DEBTS accountancy mode (See Accountancy module configuration) Param=Setup AccountsGeneral=Accounts @@ -30,6 +29,8 @@ VATToCollect=VAT to collect VATSummary=VAT Summary VATPayed=VAT payed VATCollected=VAT collected +ToPay=To pay +ToGet=To get back TaxAndDividendsArea=Tax, social contributions and dividends area SocialContribution=Social contribution SocialContributions=Social contributions @@ -87,12 +88,15 @@ RulesResultDue=- Amounts shown are with all taxes included
- It includes outs RulesResultInOut=- Amounts shown are with all taxes included
- It includes the real payments made on invoices, expenses and VAT.
- It is based on the payment dates of the invoices, expenses anf VAT.
RulesCADue=- It includes the clients' due invoices whether they are paid or not.
- It is based on the validation date of these invoices.
RulesCAIn=- It includes all the effective payments of invoices received from clients.
- It is based on the payment date of these invoices
-VATReportByCustomersInInputOutputMode=Rapport par trimestre des TVA collectées et payés (TVA sur encaissement) -VATReportByCustomersInDueDebtMode=Rapport par trimestre des TVA collectées et payés (TVA sur débit) -VATReportByQuarterInInputOutputMode=Rapport par client des TVA collectées et payés (TVA sur encaissement) -VATReportByQuarterInDueDebtMode=Rapport par client des TVA collectées et payés (TVA sur débit) -SeeVATReportInInputOutputMode=Voir le rapport %sRecettes-Dépenses%s dit TVA encaissement pour un calcul sur les paiements effectivement réalisés -SeeVATReportInDueDebtMode=Voir le rapport %sCréances-Dettes%s dit TVA sur débit pour un calcul sur les factures émises -RulesVATIn=- Il inclut les TVA sur la base des réglements effectivement reçus ou émis.
- Il se base sur la date du réglement. -RulesVATDue=- Il inclut les TVA sur la base des factures clients dues, qu'elles soient payées ou non.
- Il se base sur la date de validation de ces factures. -AmountHTVATQualified=HT VAT qualified \ No newline at end of file +VATReportByCustomersInInputOutputMode=Rapport par client des TVA collectées et payés (TVA sur encaissement) +VATReportByCustomersInDueDebtMode=Rapport par client des TVA collectées et payés (TVA sur débit) +VATReportByQuartersInInputOutputMode=Rapport par trimestre des TVA collectées et payés (TVA sur encaissement) +VATReportByQuartersInDueDebtMode=Rapport par trimestre des TVA collectées et payés (TVA sur débit) +SeeVATReportInInputOutputMode=Voir le rapport %sTVA encaissement%s pour mode de calcul standard +SeeVATReportInDueDebtMode=Voir le rapport %sTVA sur débit%s pour mode de calcul avec option sur les débits +RulesVATIn=- Pour les services, le rapport inclut les TVA des réglements effectivement reçus ou émis en se basant sur la date du réglement.
- Pour les biens matériels, il inclut les TVA des factures en se basant sur la date de validation de la facture. +RulesVATDue=- Pour les services, le rapport inclut les TVA des factures dues, payées ou non en se basant sur la date de validation de ces factures.
- Pour les biens matériels, il inclut les TVA des factures en se basant sur la date de validation de la facture. +OptionVatInfoModuleComptabilite=Remarque : Pour les biens matériels, il faudrait utiliser la date de livraison pour être plus juste. +AmountHTVATRealReceived=HT collectée +AmountHTVATRealPayed=HT payé +PercentOfInvoice=%%/invoice \ No newline at end of file diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index 313355dc5a0..42722d035f2 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -29,6 +29,8 @@ VATToCollect=TVA VATSummary=Résumé TVA VATPayed=TVA payée VATCollected=TVA récupérée +ToPay=A payer +ToGetBack=A récupérer TaxAndDividendsArea=Espace taxes, charges sociales et dividendes SocialContribution=Charge sociale SocialContributions=Charges sociales @@ -92,8 +94,9 @@ VATReportByQuartersInInputOutputMode=Rapport par trimestre des TVA collect VATReportByQuartersInDueDebtMode=Rapport par trimestre des TVA collectées et payés (TVA sur débit) SeeVATReportInInputOutputMode=Voir le rapport %sTVA encaissement%s pour mode de calcul standard SeeVATReportInDueDebtMode=Voir le rapport %sTVA sur débit%s pour mode de calcul avec option sur les débits -RulesVATIn=- Pour les services, il inclut les TVA des réglements effectivement reçus ou émis en se basant sur la date du réglement.
- Pour les biens matériels, il inclut les TVA des factures en se basant sur la date de validation de la facture. -RulesVATDue=- Pour les services, il inclut les TVA des factures dues, payées ou non en se basant sur la date de validation de ces factures.
- Pour les biens matériels, il inclut les TVA des factures en se basant sur la date de validation de la facture. +RulesVATIn=- Pour les services, le rapport inclut les TVA des réglements effectivement reçus ou émis en se basant sur la date du réglement.
- Pour les biens matériels, il inclut les TVA des factures en se basant sur la date de validation de la facture. +RulesVATDue=- Pour les services, le rapport inclut les TVA des factures dues, payées ou non en se basant sur la date de validation de ces factures.
- Pour les biens matériels, il inclut les TVA des factures en se basant sur la date de validation de la facture. OptionVatInfoModuleComptabilite=Remarque : Pour les biens matériels, il faudrait utiliser la date de livraison pour être plus juste. AmountHTVATRealReceived=HT collectée -AmountHTVATRealPayed=HT payé \ No newline at end of file +AmountHTVATRealPayed=HT payé +PercentOfInvoice=%%/facture \ No newline at end of file
'.$productcust.''.$amountcust.''.$langs->trans("Payment").' (% of invoice)'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')'.$langs->trans("AmountHTVATRealReceived").''.$vatcust.'
'.$fields['link'].''; if ($fields['pid']) { @@ -276,7 +278,7 @@ foreach(array_keys($x_coll) as $rate) else $text = img_object($langs->trans('Product'),'product'); print $text.' '; } - print dolibarr_trunc($fields['descr'],24).'
  '.price(price2num($subtot_coll_total,'MT')).''.price(price2num($subtot_coll_total_ht,'MT')).''.price(price2num($subtot_coll_vat,'MT')).'
'.$vatsup.'
  '.price(price2num($subtot_paye_total,'MT')).''.price(price2num($subtot_paye_total_ht,'MT')).''.price(price2num($subtot_paye_vat,'MT')).'
 
'.$langs->trans("TotalToPay").', '.$langs->trans("Quadri").$q.''.$langs->trans("TotalToPay").', '.$langs->trans("Quadri").' '.$q.':
'.price(price2num($diff,'MT'))."