diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 63f99184884..d4005fe2ed1 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -194,7 +194,7 @@ if ($result) { print_liste_field_titre($langs->trans("Pcgtype"), $_SERVER["PHP_SELF"], "aa.pcg_type", "", $params, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Pcgsubtype"), $_SERVER["PHP_SELF"], "aa.pcg_subtype", "", $params, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Activated"), $_SERVER["PHP_SELF"], "aa.active", "", $params, "", $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $params, "", 'width="60" align="center"', $sortfield, $sortorder); + print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $params, "", 'width="60" align="center"', $sortfield, $sortorder); print ''; print ''; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 63060e1ed60..7d26ef34e5a 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -111,14 +111,14 @@ if ($action == 'update') { } if (! empty($btn_changeaccount)) { - $msg = '
' . $langs->trans("Processing") . '...
'; + //$msg = '
' . $langs->trans("Processing") . '...
'; if (! empty($chk_prod)) { $accounting = new AccountingAccount($db); - $msg .= '
' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '
'; + //$msg .= '
' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '
'; - $cpt = 0; + $cpt = 0; $ok = 0; $ko = 0; foreach ( $chk_prod as $productid ) { $accounting_account_id = GETPOST('codeventil_' . $productid); @@ -140,18 +140,22 @@ if ($action == 'update') { dol_syslog("/accountancy/admin/productaccount.php sql=" . $sql, LOG_DEBUG); if ($db->query($sql)) { - $msg .= '
' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accounting->account_number) . '
'; + $ok++; + //$msg .= '
' . $langs->trans("Product") . ' ' . $productid . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accounting->account_number) . '
'; } else { - $msg .= '
' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accounting->account_number) . '
' . $sql . '
'; + $ko++; + //$msg .= '
' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accounting->account_number) . '
' . $sql . '
'; } } $cpt ++; } } else { - $msg .= '
' . $langs->trans("AnyLineVentilate") . '
'; + //$msg .= '
' . $langs->trans("AnyLineVentilate") . '
'; } - $msg .= '
' . $langs->trans("EndProcessing") . '
'; + if ($ko) setEventMessages($langs->trans("XLineFailedToBeBinded", $ko), null, 'errors'); + if ($ok) setEventMessages($langs->trans("XLineSuccessfullyBinded", $ok), null, 'mesgs'); + //$msg .= '
' . $langs->trans("EndProcessing") . '
'; } } @@ -173,7 +177,7 @@ $aacompta_servsell = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $aacompta_prodsell = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); // Purge search criteria -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers { $search_ref = ''; $search_label = ''; @@ -203,7 +207,7 @@ print ''; -$sql = "SELECT p.rowid, p.ref , p.label, p.description , p.accountancy_code_sell, p.accountancy_code_buy, p.tms, p.fk_product_type as product_type"; +$sql = "SELECT p.rowid, p.ref, p.label, p.description , p.accountancy_code_sell, p.accountancy_code_buy, p.tms, p.fk_product_type as product_type"; $sql .= " FROM " . MAIN_DB_PREFIX . "product as p"; $sql .= " WHERE ("; @@ -265,17 +269,13 @@ if ($result) { print '
'; - print "

\n"; - - if (! empty($msg)) { - print $msg; - } + print "
\n"; print ''; print ''; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder); /* if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { print_liste_field_titre($langs->trans("Accountancy_code_buy")); @@ -284,19 +284,19 @@ if ($result) { } */ print_liste_field_titre($langs->trans("AccountAccounting")); - print_liste_field_titre($langs->trans("Modify") . '
/ ', '', '', '', '', 'align="center"'); + //print_liste_field_titre($langs->trans("Modify") . '
/ ', '', '', '', '', 'align="center"'); + print_liste_field_titre('', '', '', '', '', 'align="center"'); print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -372,13 +372,13 @@ if ($result) { // Checkbox select print ''; + print ''; print ""; $i ++; } print '
 '; - print ''; - print ' '; - print ''; + $searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1); + print $searchpitco; print '
'; - print '
'; - print '
'; + print '
'; print ''; $db->free($result); diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index f3571d14ea7..fa6cac31601 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -45,8 +45,10 @@ EndProcessing=The end of processing AnyLineVentilate=Any lines to ventilate SelectedLines=Selected lines Lineofinvoice=Line of invoice -VentilatedinAccount=Ventilated successfully in the accounting account -NotVentilatedinAccount=Not ventilated in the accounting account +VentilatedinAccount=Binded successfully to the accounting account +NotVentilatedinAccount=Not binded to the accounting account +XLineSuccessfullyBinded=%s products/services successfuly binded to an accounting account +XLineFailedToBeBinded=%s products/services were not binded to any accounting account ACCOUNTING_LIMIT_LIST_VENTILATION=Number of elements to be breakdown shown by page (maximum recommended : 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin the sorting of the breakdown pages "Has to breakdown" by the most recent elements