From fdb938af0fd047d0780cfcfebf8db4477fe0850e Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 4 Jul 2014 13:44:26 +0200 Subject: [PATCH 1/6] [ task #1063 ] Allow edit localtaxes rate for thirds. Remove country condition --- htdocs/compta/facture/prelevement.php | 26 ++++++++++++-------------- htdocs/langs/es_ES/companies.lang | 3 +++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index e579bc21640..8cc3ba278a4 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -3,7 +3,7 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -384,21 +384,19 @@ if ($object->id > 0) print ''.$langs->trans('Currency'.$conf->currency).''; // Amount Local Taxes - if ($mysoc->country_code=='ES') + if ($mysoc->localtax1_assuj=="1") //Localtax1 { - if ($mysoc->localtax1_assuj=="1") //Localtax1 RE - { - print ''.$langs->transcountry("AmountLT1",$mysoc->country_code).''; - print ''.price($object->total_localtax1).''; - print ''.$langs->trans("Currency".$conf->currency).''; - } - if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF - { - print ''.$langs->transcountry("AmountLT2",$mysoc->country_code).''; - print ''.price($object->total_localtax2).''; - print ''.$langs->trans("Currency".$conf->currency).''; - } + print ''.$langs->transcountry("AmountLT1",$mysoc->country_code).''; + print ''.price($object->total_localtax1).''; + print ''.$langs->trans("Currency".$conf->currency).''; } + if ($mysoc->localtax2_assuj=="1") //Localtax2 + { + print ''.$langs->transcountry("AmountLT2",$mysoc->country_code).''; + print ''.price($object->total_localtax2).''; + print ''.$langs->trans("Currency".$conf->currency).''; + } + print ''.$langs->trans('AmountTTC').''.price($object->total_ttc).''; print ''.$langs->trans('Currency'.$conf->currency).''; diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index 89517bd8578..51b72ba0f51 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -91,6 +91,9 @@ LocalTax2IsUsedES= Sujeto a IRPF LocalTax2IsNotUsedES= No sujeto a IRPF LocalTax1ES=RE LocalTax2ES=IRPF +TypeLocaltax1ES= Tipo RE +TypeLocaltax2ES= Tipo IRPF +TypeES= Tipo ThirdPartyEMail=%s WrongCustomerCode=Código cliente incorrecto WrongSupplierCode=Código proveedor incorrecto From 8e4e08f907f51bcb3698f077fa9183c5c633bc4a Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 4 Jul 2014 16:48:42 +0200 Subject: [PATCH 2/6] [ task #1063 ] Allow edit localtaxes rate for thirds. Improve visu --- htdocs/comm/propal.php | 8 ++++---- htdocs/commande/fiche.php | 16 ++++++++-------- htdocs/compta/facture.php | 12 ++++++------ htdocs/fourn/commande/fiche.php | 4 ++-- htdocs/fourn/facture/fiche.php | 4 ++-- htdocs/langs/es_ES/companies.lang | 3 --- 6 files changed, 22 insertions(+), 25 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index a687e1dff5b..059af63b708 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1463,12 +1463,12 @@ if ($action == 'create') { print '' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . ''; print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . ''; print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . ""; - if ($mysoc->localtax1_assuj == "1") // Localtax1 + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1 { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . ""; } - if ($mysoc->localtax2_assuj == "1") // Localtax2 + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 { print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . ""; } @@ -1985,13 +1985,13 @@ if ($action == 'create') { print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1") // Localtax1 + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1 { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ''; print '' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . ''; print ''; } - if ($mysoc->localtax2_assuj == "1") // Localtax2 + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 { print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ''; print '' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . ''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 8e8fb94c0c7..8b1d6ec9ae3 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1589,12 +1589,12 @@ if ($action == 'create' && $user->rights->commande->creer) { print '' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . ''; print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . ''; print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . ""; - if ($mysoc->localtax1_assuj == "1") // Localtax1 RE + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . ""; } - if ($mysoc->localtax2_assuj == "1") // Localtax2 IRPF + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 IRPF { print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . ""; } @@ -1840,9 +1840,9 @@ if ($action == 'create' && $user->rights->commande->creer) { $nbrow ++; // Local taxes - if ($mysoc->localtax1_assuj == "1") + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) $nbrow ++; - if ($mysoc->localtax2_assuj == "1") + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0 ) $nbrow ++; print ''; @@ -2115,9 +2115,9 @@ if ($action == 'create' && $user->rights->commande->creer) { } $rowspan = 4; - if ($mysoc->localtax1_assuj == "1") + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) $rowspan ++; - if ($mysoc->localtax2_assuj == "1") + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) $rowspan ++; // Total HT @@ -2138,12 +2138,12 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1") // Localtax1 RE + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1 { print ''; print ''; } - if ($mysoc->localtax2_assuj == "1") // Localtax2 IRPF + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 IRPF { print ''; print ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 555640a50ce..e20173bf30c 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2302,12 +2302,12 @@ if ($action == 'create') print ''; print ''; print '"; - if ($mysoc->localtax1_assuj == "1") // Localtax1 RE + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 { print '"; } - if ($mysoc->localtax2_assuj == "1") // Localtax2 IRPF + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 { print '"; } @@ -2907,9 +2907,9 @@ if ($action == 'create') if (! empty($conf->banque->enabled)) $nbcols ++; // if (! empty($soc->outstandingbill)) $nbrows++; - if ($mysoc->localtax1_assuj == "1") + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) $nbrows ++; - if ($mysoc->localtax2_assuj == "1") + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) $nbrows ++; if ($selleruserevenustamp) $nbrows ++; @@ -3173,12 +3173,12 @@ if ($action == 'create') print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) // Localtax1 (example RE) + if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) // Localtax1 { print ''; print ''; } - if ($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) // Localtax2 (example IRPF) + if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) // Localtax2 { print ''; print ''; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 26e84aa0d55..05e2fe8822f 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1506,13 +1506,13 @@ elseif (! empty($object->id)) print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj=="1") //Localtax1 + if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1 { print ''; print ''; print ''; } - if ($mysoc->localtax2_assuj=="1") //Localtax2 + if ($mysoc->localtax2_assuj=="1" || $object->total_localtax2 != 0) //Localtax2 { print ''; print ''; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 9d5670771cd..9cd11bd58bf 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1368,12 +1368,12 @@ if ($action == 'create') print '"; if ($mysoc->country_code=='ES') { - if ($mysoc->localtax1_assuj=="1") //Localtax1 RE + if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1 { print '"; } - if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF + if ($mysoc->localtax2_assuj=="1" || $object->total_localtax2 != 0) //Localtax2 { print '"; } diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index 51b72ba0f51..89517bd8578 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -91,9 +91,6 @@ LocalTax2IsUsedES= Sujeto a IRPF LocalTax2IsNotUsedES= No sujeto a IRPF LocalTax1ES=RE LocalTax2ES=IRPF -TypeLocaltax1ES= Tipo RE -TypeLocaltax2ES= Tipo IRPF -TypeES= Tipo ThirdPartyEMail=%s WrongCustomerCode=Código cliente incorrecto WrongSupplierCode=Código proveedor incorrecto From 2ca01741acdc925306e4ad75d8007527556ec299 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 4 Jul 2014 17:17:35 +0200 Subject: [PATCH 3/6] [ task #1063 ] Allow edit localtaxes rate for thirds. Language --- htdocs/langs/en_US/companies.lang | 3 +++ htdocs/langs/en_US/compta.lang | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 000d7496afc..1b2ea17215b 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -91,6 +91,9 @@ LocalTax2IsUsedES= IRPF is used LocalTax2IsNotUsedES= IRPF is not used LocalTax1ES=RE LocalTax2ES=IRPF +TypeLocaltax1ES=RE Type +TypeLocaltax2ES=IRPF Type +TypeES=Type ThirdPartyEMail=%s WrongCustomerCode=Customer code invalid WrongSupplierCode=Supplier code invalid diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 2b98ccc5608..121c991e0fc 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -4,6 +4,7 @@ AccountancyCard=Accountancy card Treasury=Treasury MenuFinancial=Financial TaxModuleSetupToModifyRules=Go to Taxes module setup to modify rules for calculation +TaxModuleSetupToModifyRulesLT=Go to Company setup to modify rules for calculation OptionMode=Option for accountancy OptionModeTrue=Option Incomes-Expenses OptionModeVirtual=Option Claims-Debts @@ -40,11 +41,15 @@ VATReceived=VAT received VATToCollect=VAT purchases VATSummary=VAT Balance LT2SummaryES=IRPF Balance +LT1SummaryES=RE Balance VATPaid=VAT paid SalaryPaid=Salary paid LT2PaidES=IRPF Paid +LT1PaidES=RE Paid LT2CustomerES=IRPF sales LT2SupplierES=IRPF purchases +LT1CustomerES=RE sales +LT1SupplierES=RE purchases VATCollected=VAT collected ToPay=To pay ToGet=To get back @@ -77,8 +82,11 @@ DateStartPeriod=Date start period DateEndPeriod=Date end period NewVATPayment=New VAT payment newLT2PaymentES=New IRPF payment +newLT1PaymentES=New RE payment LT2PaymentES=IRPF Payment LT2PaymentsES=IRPF Payments +LT1PaymentES=RE Payment +LT1PaymentsES=RE Payments VATPayment=VAT Payment VATPayments=VAT Payments SocialContributionsPayments=Social contributions payments @@ -114,6 +122,12 @@ CalcModeVATDebt=Mode %sVAT on commitment accounting%s. CalcModeVATEngagement=Mode %sVAT on incomes-expenses%s. CalcModeDebt=Mode %sClaims-Debts%s said Commitment accounting. CalcModeEngagement=Mode %sIncomes-Expenses%s said cash accounting +CalcModeLT1= Mode %sRE on customer invoices - suppliers invoices%s +CalcModeLT1Debt=Modo %sRE on customer invoices%s +CalcModeLT1Rec= Modo %sRE on suppliers invoices%s +CalcModeLT2= Modo %sIRPF on customer invoices - suppliers invoices%s +CalcModeLT2Debt=Modo %sIRPF on customer invoices%s +CalcModeLT2Rec= Modo %sIRPF on suppliers invoices%s AnnualSummaryDueDebtMode=Balance of income and expenses, annual summary AnnualSummaryInputOutputMode=Balance of income and expenses, annual summary AnnualByCompaniesDueDebtMode=Balance of income and expenses, detail by third parties, mode %sClaims-Debts%s said Commitment accounting. @@ -128,10 +142,15 @@ RulesCAIn=- It includes all the effective payments of invoices received from cli DepositsAreNotIncluded=- Deposit invoices are nor included DepositsAreIncluded=- Deposit invoices are included LT2ReportByCustomersInInputOutputModeES=Report by third party IRPF +LT1ReportByCustomersInInputOutputModeES=Report by third party RE VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid VATReportByCustomersInDueDebtMode=Report by the customer VAT collected and paid VATReportByQuartersInInputOutputMode=Report by rate of the VAT collected and paid +LT1ReportByQuartersInInputOutputMode=Report by RE rate +LT2ReportByQuartersInInputOutputMode=Report by IRPF rate VATReportByQuartersInDueDebtMode=Report by rate of the VAT collected and paid +LT1ReportByQuartersInDueDebtMode=Report by RE rate +LT2ReportByQuartersInDueDebtMode=Report by IRPF rate SeeVATReportInInputOutputMode=See report %sVAT encasement%s for a standard calculation SeeVATReportInDueDebtMode=See report %sVAT on flow%s for a calculation with an option on the flow RulesVATInServices=- For services, the report includes the VAT regulations actually received or issued on the basis of the date of payment. From 65d303999f37115808004611b0484f4511fe4c9b Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 4 Jul 2014 17:26:21 +0200 Subject: [PATCH 4/6] [ task #1063 ] Allow edit localtaxes rate for thirds --- htdocs/compta/localtax/clients.php | 8 ++++---- htdocs/compta/localtax/quadri_detail.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index a75d48385cb..b6c0a13f246 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -110,11 +110,11 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice { $nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT'.$local.'Rec"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/taxes.php').')'; + $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; - $description.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; + $description.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; $builddate=time(); $elementcust=$langs->trans("CustomersInvoices"); @@ -128,11 +128,11 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services { $nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code); $calcmode=$langs->trans("CalcModeLT2Debt"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/taxes.php').')'; + $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); $description.=$fsearch; - $description.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; + $description.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; $builddate=time(); $elementcust=$langs->trans("CustomersInvoices"); diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index a400d1b96a4..5989159dcd8 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -130,7 +130,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice { $nom=$langs->trans($local==1?"LT1ReportByQuartersInDueDebtMode":"LT2ReportByQuartersInDueDebtMode"); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT'.$local.'Rec"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; + $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; @@ -162,7 +162,7 @@ if ($conf->global->$calc==2) // Invoice for goods, payment for services { $nom=$langs->trans($local==1?"LT1ReportByQuartersInInputOutputMode":"LT2ReportByQuartersInInputOutputMode"); $calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT'.$local.'Rec"); - $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; + $calcmode.='
('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')'; $period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1); $prevyear=$year_start; $prevquarter=$q; if ($prevquarter > 1) $prevquarter--; From 74b42f6cb4b5bdf10a19cf9370953c0cf10a3949 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 4 Jul 2014 17:31:34 +0200 Subject: [PATCH 5/6] [ task #1063 ] Allow edit localtaxes rate for thirds --- htdocs/compta/localtax/index.php | 4 ++-- htdocs/langs/en_US/compta.lang | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 67b33a65cec..1ee31f5ebbd 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -121,8 +121,8 @@ $textnextyear=" transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); -print $langs->trans("VATReportBuildWithOptionDefinedInModule").'
'; -print '('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')
'; +print $langs->trans("LTReportBuildWithOptionDefinedInModule").'
'; +print '('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')
'; print '
'; print '
' . $langs->trans('AmountVAT') . '' . price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency) . '
' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency) . '
' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency) . '
' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . '
' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . '
' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . "
' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . "
' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . "
' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency) . '
' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency) . '
'.$langs->trans("Currency".$conf->currency).'
'.$langs->transcountry("AmountLT1",$mysoc->country_code).''.price($object->total_localtax1).''.$langs->trans("Currency".$conf->currency).'
'.$langs->transcountry("AmountLT2",$mysoc->country_code).''.price($object->total_localtax2).'
'.$langs->trans('TotalVAT').''.price($objectsrc->total_tva)."
'.$langs->transcountry("AmountLT1",$mysoc->country_code).''.price($objectsrc->total_localtax1)."
'.$langs->transcountry("AmountLT2",$mysoc->country_code).''.price($objectsrc->total_localtax2)."
'; diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 121c991e0fc..ee5655ebe2e 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -12,6 +12,7 @@ OptionModeTrueDesc=In this context, the turnover is calculated over payments (da 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. FeatureIsSupportedInInOutModeOnly=Feature only available in CREDITS-DEBTS accountancy mode (See Accountancy module configuration) VATReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Tax module setup. +LTReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Company setup. Param=Setup RemainingAmountPayment=Amount payment remaining : AmountToBeCharged=Total amount to pay : From 9aa234255d0c96ed05490130badc11361439792d Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 4 Jul 2014 18:26:56 +0200 Subject: [PATCH 6/6] [ task #1063 ] Allow edit localtaxes rate for thirds --- htdocs/admin/company.php | 35 +++++++++++++++++++++++------------ htdocs/langs/en_US/admin.lang | 1 + 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index fd3629b1cba..f136c1200cf 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -597,7 +597,7 @@ if ($action == 'edit' || $action == 'updateedit') print ($example!="LocalTax1IsUsedExample"?"\n":""); if(! isOnlyOneLocalTax(1)) { - print ''; @@ -639,7 +639,7 @@ if ($action == 'edit' || $action == 'updateedit') print ""; $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsUsedExample"?"\n":""); - print '"; $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsUsedExample"?"\n":""); - if($conf->global->MAIN_INFO_VALUE_LOCALTAX1!=0){ - print ''; + if($conf->global->MAIN_INFO_VALUE_LOCALTAX1!=0) + { + print ''; } print '"; $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsUsedExample"?"\n":""); - if($conf->global->MAIN_INFO_VALUE_LOCALTAX2!=0){ - print ''; + if($conf->global->MAIN_INFO_VALUE_LOCALTAX2!=0) + { + print ''; } print '
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."
'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).': '; + print '
'.$langs->trans("LTRate").': '; $formcompany->select_localtax(1,$conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1"); } print '
".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."
'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).': '; + print '
'.$langs->transcountry("LTRate").': '; if(! isOnlyOneLocalTax(2)) { $formcompany->select_localtax(2,$conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2"); @@ -1000,15 +1000,20 @@ else print "
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."
'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX1 .'
'.$langs->trans("LTRate").': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX1 .'
'.$langs->trans("CalcLocaltax").': '; - if($conf->global->MAIN_INFO_LOCALTAX_CALC1==0){ + if($conf->global->MAIN_INFO_LOCALTAX_CALC1==0) + { print $langs->transcountry("CalcLocaltax1",$mysoc->country_code); - }else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==1){ + } + else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==1) + { print $langs->transcountry("CalcLocaltax2",$mysoc->country_code); - }else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){ + } + else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){ print $langs->transcountry("CalcLocaltax3",$mysoc->country_code); } @@ -1046,15 +1051,21 @@ else print "
".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."
'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX2 .'
'.$langs->trans("LTRate").': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX2 .'
'.$langs->trans("CalcLocaltax").': '; - if($conf->global->MAIN_INFO_LOCALTAX_CALC2==0){ + if($conf->global->MAIN_INFO_LOCALTAX_CALC2==0) + { print $langs->transcountry("CalcLocaltax1",$mysoc->country_code); - }else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==1){ + } + else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==1) + { print $langs->transcountry("CalcLocaltax2",$mysoc->country_code); - }else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==2){ + } + else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==2) + { print $langs->transcountry("CalcLocaltax3",$mysoc->country_code); } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 55f72609b80..5355d26161e 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -785,6 +785,7 @@ VATIsNotUsedDesc=By default the proposed VAT is 0 which can be used for cases li VATIsUsedExampleFR=In France, it means companies or organisations having a real fiscal system (Simplified real or normal real). A system in which VAT is declared. VATIsNotUsedExampleFR=In France, it means associations that are non VAT declared or companies, organisations or liberal professions that have chosen the micro enterprise fiscal system (VAT in franchise) and paid a franchise VAT without any VAT declaration. This choice will display the reference "Non applicable VAT - art-293B of CGI" on invoices. ##### Local Taxes ##### +LTRate=Rate LocalTax1IsUsed=Use second tax LocalTax1IsNotUsed=Do not use second tax LocalTax1IsUsedDesc=Use a second type of tax (other than VAT)