From 60bf3452c3acc4d216392753fca134fadd14d78a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 4 May 2019 12:26:54 +0200 Subject: [PATCH] Hide export in EEC for non european countries --- htdocs/accountancy/admin/productaccount.php | 11 +++++++---- htdocs/langs/en_US/accountancy.lang | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index bd79791f709..80c2ed052c0 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -200,7 +200,7 @@ $form = new FormAccounting($db); // at this time ACCOUNTING_SERVICE_SOLD_ACCOUNT & ACCOUNTING_PRODUCT_SOLD_ACCOUNT are account number not accountingacount rowid // so we need to get those default value rowid first $accounting = new AccountingAccount($db); -// TODO: we should need to check if result is a really exist accountaccount rowid..... +// TODO: we should need to check if result is already exists accountaccount rowid..... $aarowid_servbuy = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1); $aarowid_prodbuy = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT, 1); $aarowid_servsell = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1); @@ -334,9 +334,12 @@ if ($result) print ' ' . $langs->trans('OptionModeProductSell') . ''; print ''.$langs->trans('OptionModeProductSellDesc'); print "\n"; - print ' ' . $langs->trans('OptionModeProductSellIntra') . ''; - print ''.$langs->trans('OptionModeProductSellIntraDesc'); - print "\n"; + if ($mysoc->isInEEC()) + { + print ' ' . $langs->trans('OptionModeProductSellIntra') . ''; + print ''.$langs->trans('OptionModeProductSellIntraDesc'); + print "\n"; + } print ' ' . $langs->trans('OptionModeProductSellExport') . ''; print ''.$langs->trans('OptionModeProductSellExportDesc'); print "\n"; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 92b78223a60..c441d71ef3d 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -300,12 +300,12 @@ DefaultBindingDesc=This page can be used to set a default account to use to link DefaultClosureDesc=This page can be used to set parameters to use to enclose a balance sheet. Options=Options OptionModeProductSell=Mode sales -OptionModeProductSellIntra=Mode sales in EEC -OptionModeProductSellExport=Mode sales out of EEC +OptionModeProductSellIntra=Mode sales exported in EEC +OptionModeProductSellExport=Mode sales exported in other countries OptionModeProductBuy=Mode purchases OptionModeProductSellDesc=Show all products with accounting account for sales. OptionModeProductSellIntraDesc=Show all products with accounting account for sales in EEC. -OptionModeProductSellExportDesc=Show all products with accounting account for sales out of EEC. +OptionModeProductSellExportDesc=Show all products with accounting account for other foreign sales. OptionModeProductBuyDesc=Show all products with accounting account for purchases. CleanFixHistory=Remove accounting code from lines that not exists into charts of account CleanHistory=Reset all bindings for selected year