diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 5394d940728..ed1c40a6ad7 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -214,7 +214,7 @@ $sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation $sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,"; $sql.= " p.accountancy_code_sell_intra as code_sell_intra, p.accountancy_code_sell_export as code_sell_export,"; $sql.= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,"; -$sql.= " co.code as country_code, co.label as country,"; +$sql.= " co.code as country_code, co.label as country_label,"; $sql.= " s.tva_intra"; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -407,7 +407,7 @@ if ($result) { print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); //print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right maxwidth50 '); print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder); @@ -514,7 +514,10 @@ if ($result) { print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')); print ''; - print '' . $objp->country .''; + print ''; + $labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label; + print $labelcountry; + print ''; print '' . $objp->tva_intra . ''; @@ -529,7 +532,7 @@ if ($result) { print ''; // Suggested accounting account - print ''; + print ''; print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone'); print ''; diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 6635758f06c..9f70d175d40 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -331,7 +331,7 @@ if ($result) { print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right maxwidth50 '); print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', $sortfield, $sortorder, 'center '); print_liste_field_titre("IntoAccount", '', '', '', '', '', $sortfield, $sortorder, 'center '); @@ -386,7 +386,7 @@ if ($result) { print ''; // Current account - print ''; + print ''; print length_accountg(html_entity_decode($objp->code_buy)); print ''; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 49e76c51dde..e4e07831b44 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -987,15 +987,14 @@ if (empty($action) || $action == 'view') { print '
'; print ""; print ""; - print ""; print ""; print ""; print ""; print ""; print ""; - print ""; - print ""; - print ""; + print '"; + print '"; + print '"; print "\n"; $r = ''; @@ -1019,7 +1018,6 @@ if (empty($action) || $action == 'view') { //var_dump($tabpay[$key]); print ''; print ''; - print ""; print ""; print ""; // Ledger account @@ -1043,9 +1041,9 @@ if (empty($action) || $action == 'view') { print ""; - print ""; - print ""; - print ""; + print '"; + print '"; + print '"; print ""; } } @@ -1061,7 +1059,6 @@ if (empty($action) || $action == 'view') { print ''; print ''; - print ""; print ""; print ""; // Ledger account @@ -1125,9 +1122,9 @@ if (empty($action) || $action == 'view') { } print ""; print ""; - print ""; - print ""; - print ""; + print '"; + print '"; + print '"; print ""; } } @@ -1141,7 +1138,6 @@ if (empty($action) || $action == 'view') { print ''; print ''; - print ""; print ""; print ""; // Ledger account @@ -1162,9 +1158,9 @@ if (empty($action) || $action == 'view') { */ print ""; print ""; - print ""; - print ""; - print ""; + print '"; + print '"; + print '"; print ""; } } diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index fcb0ac8713f..4c50015a2ba 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -549,14 +549,13 @@ if (empty($action) || $action == 'view') { print '
'; print "
" . $langs->trans("Date") . "" . $langs->trans("Piece") . ' (' . $langs->trans("ObjectsRef") . ")" . $langs->trans("AccountAccounting") . "" . $langs->trans("SubledgerAccount") . "" . $langs->trans("LabelOperation") . "" . $langs->trans("PaymentMode") . "" . $langs->trans("Debit") . "" . $langs->trans("Credit") . "' . $langs->trans("PaymentMode") . "' . $langs->trans("Debit") . "' . $langs->trans("Credit") . "
" . $date . "" . $ref . ""; print $reflabel; print "" . $val["type_payment"] . "" . ($mt >= 0 ? price($mt) : '') . "" . ($mt < 0 ? price(- $mt) : '') . "' . $val["type_payment"] . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $ref . "" . $reflabel . "" . $val["type_payment"] . "" . ($mt < 0 ? price(- $mt) : '') . "" . ($mt >= 0 ? price($mt) : '') . "' . $val["type_payment"] . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
" . $date . "" . $ref . "" . $reflabel . "" . $val["type_payment"] . "" . ($mt < 0 ? price(- $mt) : '') . "" . ($mt >= 0 ? price($mt) : '') . "' . $val["type_payment"] . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
"; print ""; - print ""; print ""; print ""; print ""; print ""; print ""; - print ""; - print ""; + print '"; + print '"; print "\n"; $r = ''; @@ -578,7 +577,7 @@ if (empty($action) || $action == 'view') { if ($mt) { print ''; - print ""; + print ""; print ""; print ""; $userstatic->id = $tabuser[$key]['id']; @@ -598,20 +597,21 @@ if (empty($action) || $action == 'view') { $userstatic->id = $tabuser[$key]['id']; $userstatic->name = $tabuser[$key]['name']; print ""; - print '"; - print '"; + print '"; + print '"; print ""; } } // Third party foreach ($tabttc[$key] as $k => $mt) { - print ''; - print ""; - print ""; - print ""; $userstatic->id = $tabuser[$key]['id']; $userstatic->name = $tabuser[$key]['name']; + + print ''; + print ""; + print ""; + print ""; // Account print "'; print ""; - print '"; - print '"; + print '"; + print '"; print ""; } @@ -646,7 +646,7 @@ if (empty($action) || $action == 'view') { foreach ($arrayofvat[$key] as $k => $mt) { if ($mt) { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -663,8 +663,8 @@ if (empty($action) || $action == 'view') { print ''; print ""; - print '"; - print '"; + print '"; + print '"; print ""; } } diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index b3eeb4c45b6..cab5069e1f8 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -783,14 +783,13 @@ if (empty($action) || $action == 'view') { print '
'; print "
" . $langs->trans("Date") . "" . $langs->trans("Piece") . ' (' . $langs->trans("ExpenseReportRef") . ")" . $langs->trans("AccountAccounting") . "" . $langs->trans("SubledgerAccount") . "" . $langs->trans("LabelOperation") . "" . $langs->trans("Debit") . "" . $langs->trans("Credit") . "' . $langs->trans("Debit") . "' . $langs->trans("Credit") . "
" . $date . "" . $expensereportstatic->getNomUrl(1) . "" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $accountingaccount->label . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $expensereportstatic->getNomUrl(1) . "
" . $date . "" . $expensereportstatic->getNomUrl(1) . ""; $accountoshow = length_accounta($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT); @@ -631,8 +631,8 @@ if (empty($action) || $action == 'view') { else print $accountoshow; print '" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("SubledgerAccount") . "' . ($mt < 0 ? - price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? - price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
" . $date . "" . $expensereportstatic->getNomUrl(1) . "" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:''); print "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
"; print ""; - print ""; print ""; print ""; print ""; print ""; print ""; - print ""; - print ""; + print '"; + print '"; print "\n"; $r = ''; @@ -830,7 +829,7 @@ if (empty($action) || $action == 'view') { if ($replacedinvoice == 1) { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -851,7 +850,7 @@ if (empty($action) || $action == 'view') { if ($errorforinvoice[$key] == 'somelinesarenotbound') { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -872,7 +871,7 @@ if (empty($action) || $action == 'view') { foreach ($tabttc[$key] as $k => $mt) { //if ($mt) { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -894,8 +893,8 @@ if (empty($action) || $action == 'view') { else print $accountoshow; print ''; print ""; - print '"; - print '"; + print '"; + print '"; print ""; //} } @@ -907,7 +906,7 @@ if (empty($action) || $action == 'view') { //if ($mt) { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -925,8 +924,8 @@ if (empty($action) || $action == 'view') { $companystatic->id = $tabcompany[$key]['id']; $companystatic->name = $tabcompany[$key]['name']; print ""; - print '"; - print '"; + print '"; + print '"; print ""; //} } @@ -941,7 +940,7 @@ if (empty($action) || $action == 'view') { foreach ($arrayofvat[$key] as $k => $mt) { if ($mt) { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -959,8 +958,8 @@ if (empty($action) || $action == 'view') { print ""; - print '"; - print '"; + print '"; + print '"; print ""; } } @@ -972,7 +971,7 @@ if (empty($action) || $action == 'view') { foreach ($tabother[$key] as $k => $mt) { if ($mt) { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -988,8 +987,8 @@ if (empty($action) || $action == 'view') { print "'; print ""; - print '"; - print '"; + print '"; + print '"; print ""; } } diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 2ea0cba8879..8f82fd95afb 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -720,14 +720,13 @@ if (empty($action) || $action == 'view') { print '
'; print "
" . $langs->trans("Date") . "" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")" . $langs->trans("AccountAccounting") . "" . $langs->trans("SubledgerAccount") . "" . $langs->trans("LabelOperation") . "" . $langs->trans("Debit") . "" . $langs->trans("Credit") . "' . $langs->trans("Debit") . "' . $langs->trans("Credit") . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount") . "'. ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "'. ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $accountingaccount->label . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . ""; print $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:''); print "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . ""; print '" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT") . " NPR (counterpart)' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
"; print ""; - print ""; print ""; print ""; print ""; print ""; print ""; - print ""; - print ""; + print '"; + print '"; print "\n"; $r = ''; @@ -765,7 +764,7 @@ if (empty($action) || $action == 'view') { if ($replacedinvoice == 1) { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -786,7 +785,7 @@ if (empty($action) || $action == 'view') { if ($errorforinvoice[$key] == 'somelinesarenotbound') { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -808,7 +807,7 @@ if (empty($action) || $action == 'view') { { //if ($mt) { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -830,8 +829,8 @@ if (empty($action) || $action == 'view') { else print $accountoshow; print ''; print ""; - print '"; - print '"; + print '"; + print '"; print ""; //} } @@ -844,7 +843,7 @@ if (empty($action) || $action == 'view') { //if ($mt) { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -862,8 +861,8 @@ if (empty($action) || $action == 'view') { $companystatic->id = $tabcompany[$key]['id']; $companystatic->name = $tabcompany[$key]['name']; print ""; - print ""; - print ""; + print '"; + print '"; print ""; //} } @@ -879,7 +878,7 @@ if (empty($action) || $action == 'view') { foreach ($arrayofvat[$key] as $k => $mt) { if ($mt) { print ''; - print ""; + print ""; print ""; print ""; // Account @@ -896,8 +895,8 @@ if (empty($action) || $action == 'view') { print ''; print ""; - print '"; - print '"; + print '"; + print '"; print ""; } } diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index e3bb5b14b44..fc8cc10fec4 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -214,7 +214,7 @@ $sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_lab $sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,"; $sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,"; $sql.= " aa.rowid as aarowid,"; -$sql.= " co.code as country_code, co.label as country,"; +$sql.= " co.code as country_code, co.label as country_label,"; $sql.= " s.tva_intra"; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -406,7 +406,7 @@ if ($result) { print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); //print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, '', $sortfield, $sortorder, 'right maxwidth50 '); print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder); @@ -502,7 +502,11 @@ if ($result) { print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')); print ''; - print ''; + print ''; + print ''; // Current account @@ -516,7 +520,7 @@ if ($result) { print ''; // Suggested accounting account - print ''; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 05d02c487c0..8ceadce89e5 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1645,7 +1645,7 @@ if ($action == 'create' && $user->rights->commande->creer) // Contact of order if ($socid > 0) { print "'; // Ligne info remises tiers diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 98085b34778..c4352b3b97e 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -217,7 +217,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++) } print ""; - print '"; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { - print ''; + print ''; } print "\n"; diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 444927ea27d..e28ea5e9af1 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -935,18 +935,18 @@ if ($resql) print ''; if (! empty($arrayfields['b.rowid']['checked'])) print_liste_field_titre($arrayfields['b.rowid']['label'], $_SERVER['PHP_SELF'], 'b.rowid', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['description']['checked'])) print_liste_field_titre($arrayfields['description']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); - if (! empty($arrayfields['b.dateo']['checked'])) print_liste_field_titre($arrayfields['b.dateo']['label'], $_SERVER['PHP_SELF'], 'b.dateo', '', $param, 'align="center"', $sortfield, $sortorder); + if (! empty($arrayfields['b.dateo']['checked'])) print_liste_field_titre($arrayfields['b.dateo']['label'], $_SERVER['PHP_SELF'], 'b.dateo', '', $param, '', $sortfield, $sortorder, "center "); if (! empty($arrayfields['b.datev']['checked'])) print_liste_field_titre($arrayfields['b.datev']['label'], $_SERVER['PHP_SELF'], 'b.datev,b.dateo,b.rowid', '', $param, 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['type']['checked'])) print_liste_field_titre($arrayfields['type']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="center"', $sortfield, $sortorder); - if (! empty($arrayfields['b.num_chq']['checked'])) print_liste_field_titre($arrayfields['b.num_chq']['label'], $_SERVER['PHP_SELF'], 'b.num_chq', '', $param, 'align="center"', $sortfield, $sortorder); + if (! empty($arrayfields['b.num_chq']['checked'])) print_liste_field_titre($arrayfields['b.num_chq']['label'], $_SERVER['PHP_SELF'], 'b.num_chq', '', $param, '', $sortfield, $sortorder, "center "); if (! empty($arrayfields['bu.label']['checked'])) print_liste_field_titre($arrayfields['bu.label']['label'], $_SERVER['PHP_SELF'], 'bu.label', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['ba.ref']['checked'])) print_liste_field_titre($arrayfields['ba.ref']['label'], $_SERVER['PHP_SELF'], 'ba.ref', '', $param, '', $sortfield, $sortorder); - if (! empty($arrayfields['b.debit']['checked'])) print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'class="right"', $sortfield, $sortorder); - if (! empty($arrayfields['b.credit']['checked'])) print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'class="right"', $sortfield, $sortorder); - if (! empty($arrayfields['balancebefore']['checked'])) print_liste_field_titre($arrayfields['balancebefore']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder); - if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder); - if (! empty($arrayfields['b.num_releve']['checked'])) print_liste_field_titre($arrayfields['b.num_releve']['label'], $_SERVER['PHP_SELF'], 'b.num_releve', '', $param, 'align="center"', $sortfield, $sortorder); - if (! empty($arrayfields['b.conciliated']['checked'])) print_liste_field_titre($arrayfields['b.conciliated']['label'], $_SERVER['PHP_SELF'], 'b.rappro', '', $param, 'align="center"', $sortfield, $sortorder); + if (! empty($arrayfields['b.debit']['checked'])) print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, '', $sortfield, $sortorder, "right "); + if (! empty($arrayfields['b.credit']['checked'])) print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, '', $sortfield, $sortorder, "right "); + if (! empty($arrayfields['balancebefore']['checked'])) print_liste_field_titre($arrayfields['balancebefore']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, "right "); + if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, "right "); + if (! empty($arrayfields['b.num_releve']['checked'])) print_liste_field_titre($arrayfields['b.num_releve']['label'], $_SERVER['PHP_SELF'], 'b.num_releve', '', $param, '', $sortfield, $sortorder, "center "); + if (! empty($arrayfields['b.conciliated']['checked'])) print_liste_field_titre($arrayfields['b.conciliated']['label'], $_SERVER['PHP_SELF'], 'b.rappro', '', $param, '', $sortfield, $sortorder, "center "); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index aeb593f53b9..5968505c540 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -594,7 +594,7 @@ if (isset($totalarray['totalbalancefield']) && $lastcurrencycode != 'various') / if ($num < $limit && empty($offset)) print ''; else print ''; } - elseif ($totalarray['totalbalancefield'] == $i) print ''; + elseif ($totalarray['totalbalancefield'] == $i) print ''; else print ''; } print ''; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index cc077ed55e1..c57b073b487 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -136,8 +136,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele */ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { - $sql = "SELECT f.ref"; - $sql.= ", f.rowid, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.ref_client"; + $sql = "SELECT f.rowid, f.ref, f.datef as date, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.ref_client"; $sql.= ", f.type"; $sql.= ", s.nom as name"; $sql.= ", s.rowid as socid, s.email"; @@ -177,13 +176,14 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { $obj = $db->fetch_object($resql); - $facturestatic->ref=$obj->ref; $facturestatic->id=$obj->rowid; + $facturestatic->ref=$obj->ref; + $facturestatic->date=$db->jdate($obj->date); + $facturestatic->type=$obj->type; $facturestatic->total_ht=$obj->total_ht; $facturestatic->total_tva=$obj->total_tva; $facturestatic->total_ttc=$obj->total_ttc; $facturestatic->ref_client=$obj->ref_client; - $facturestatic->type=$obj->type; $companystatic->id=$obj->socid; $companystatic->name=$obj->name; diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index f84a805caef..3107cf29742 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -472,14 +472,14 @@ if ($action == 'new') print '
" . $langs->trans("Date") . "" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")" . $langs->trans("AccountAccounting") . "" . $langs->trans("SubledgerAccount") . "" . $langs->trans("LabelOperation") . "" . $langs->trans("Debit") . "" . $langs->trans("Credit") . "' . $langs->trans("Debit") . "' . $langs->trans("Credit") . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount") . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label . "" . ($mt < 0 ? price(- $mt) : '') . "" . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:''); print "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(- $mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
' . $objp->country .''; + $labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label; + print $labelcountry; + print '' . $objp->tva_intra . ''; + print ''; print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone'); print '
" . $langs->trans("DefaultContact") . ''; - $form->select_contacts($soc->id, $setcontact, 'contactid', 1, $srccontactslist); + $form->select_contacts($soc->id, $setcontact, 'contactid', 1, $srccontactslist, '', 1); print '
 '; + print ' '; if ($encaiss[$case]>0) { print price($encaiss[$case]); @@ -232,7 +232,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++) print '
'.$langs->trans("Total")."'.price($totsorties[$annee]).''.price($totentrees[$annee]).''.price($totsorties[$annee]).''.price($totentrees[$annee]).'
'.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price($totalarray['totalbalance'], 0, $langs, 0, 0, -1, $lastcurrencycode).''.price($totalarray['totalbalance'], 0, $langs, 0, -1, -1, $lastcurrencycode).'
'."\n"; print ''; - print ''."\n"; - print '\n"; - print '\n"; - print '\n"; - print '\n"; - print '\n"; - print '\n"; - print ''."\n"; + print '\n"; + print '\n"; + print '\n"; + print '\n"; + print '\n"; + print '\n"; + print ''; print "\n"; diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php index 57adf1c06cb..6447b63b120 100644 --- a/htdocs/core/boxes/box_contracts.php +++ b/htdocs/core/boxes/box_contracts.php @@ -151,7 +151,7 @@ class box_contracts extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="nowrap right"', + 'td' => 'class="nowraponall right"', 'text' => $contractstatic->getLibStatut(7), 'asis'=>1, ); diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 42c21f0708b..3465182ff02 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -149,7 +149,7 @@ class box_factures extends ModeleBoxes } $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $facturestatic->getNomUrl(1), 'text2'=> $late, 'asis' => 1, @@ -162,7 +162,7 @@ class box_factures extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', + 'td' => 'class="right nowraponall"', 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), ); diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 3dc8011fd7f..fd55478932c 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -144,27 +144,27 @@ class box_factures_fourn extends ModeleBoxes } $this->info_box_contents[$line][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $facturestatic->getNomUrl(1), 'text2'=> $late, 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => 'class="tdoverflowmax50"', + 'td' => 'class="tdoverflowmax150"', 'text' => $objp->ref_supplier, 'tooltip' => $langs->trans('SupplierInvoice').': '.($objp->ref?$objp->ref:$objp->facid).'
'.$langs->trans('RefSupplier').': '.$objp->ref_supplier, 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid, ); $this->info_box_contents[$line][] = array( - 'td' => 'class="tdoverflowmax50"', + 'td' => 'class="tdoverflowmax150"', 'text' => $thirdpartytmp->getNomUrl(1, 'supplier'), 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', + 'td' => 'class="right nowraponall"', 'text' => price($objp->total_ht, 0, $langs, 0, -1, -1, $conf->currency), ); diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 68959b15056..b1330192a11 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -191,19 +191,19 @@ class box_services_contracts extends ModeleBoxes $this->info_box_contents[$i][] = array( - 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $s, 'asis' => 1 ); $this->info_box_contents[$i][] = array( - 'td' => '', + 'td' => 'class="nowraponall"', 'text' => $contractstatic->getNomUrl(1), 'asis' => 1 ); $this->info_box_contents[$i][] = array( - 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', + 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', 'text' => $thirdpartytmp->getNomUrl(1), 'asis' => 1 ); diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index d42bfcbeb5a..d2fb93000a9 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -716,12 +716,13 @@ class FormCompany } } print "\n"; + print ajax_combobox($htmlname); return $firstCompany; } else { dol_print_error($this->db); - print 'Error sql'; + return 0; } } } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 8f0aee14424..be389a94283 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1042,7 +1042,7 @@ class FormFile * @param int $useinecm Change output for use in ecm module: * 0 or 6: Add a preview column. Show also a rename button. Show also a crop button for some values of $modulepart (must be supported into hard coded list in this function + photos_resize.php + restrictedArea + checkUserAccessToObject) * 1: Add link to edit ECM entry - * 2: Add rename and crop file + * 2: Add rename and crop link * 4: Add a preview column * 5: Add link to edit ECM entry and Add a preview column * @param string $textifempty Text to show if filearray is empty ('NoFileFound' if not defined) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 19b39fd776d..a25fd098f9a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5274,10 +5274,10 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart) /** * Creation of a directory (this can create recursive subdir) * - * @param string $dir Directory to create (Separator must be '/'. Example: '/mydir/mysubdir') - * @param string $dataroot Data root directory (To avoid having the data root in the loop. Using this will also lost the warning on first dir PHP has no permission when open_basedir is used) - * @param int $newmask Mask for new file (Defaults to $conf->global->MAIN_UMASK or 0755 if unavailable). Example: '0444' - * @return int < 0 if KO, 0 = already exists, > 0 if OK + * @param string $dir Directory to create (Separator must be '/'. Example: '/mydir/mysubdir') + * @param string $dataroot Data root directory (To avoid having the data root in the loop. Using this will also lost the warning on first dir PHP has no permission when open_basedir is used) + * @param string|null $newmask Mask for new file (Defaults to $conf->global->MAIN_UMASK or 0755 if unavailable). Example: '0444' + * @return int < 0 if KO, 0 = already exists, > 0 if OK */ function dol_mkdir($dir, $dataroot = '', $newmask = null) { diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index c8640f9928f..4d79d0d4db3 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -483,7 +483,7 @@ function show_stats_for_company($product, $socid) /** * Return translation label of a unit key * - * @param int $unit Unit key (-3,0,3,98,99...) + * @param int $unit ID of unit (rowid in llx_c_units table) * @param string $measuring_style Style of unit: weight, volume,... * @return string Unit string * @see formproduct->selectMeasuringUnits @@ -494,7 +494,7 @@ function measuring_units_string($unit, $measuring_style = '') require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php'; $measuringUnits= new CUnits($db); $result = $measuringUnits->fetchAll('', '', 0, 0, array( - 't.code' => $unit, + 't.rowid' => $unit, 't.unit_type' => $measuring_style, 't.active' => 1 )); diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 1ff48a67107..4676d48073c 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -446,7 +446,9 @@ class Expedition extends CommonObject */ public function create_line($entrepot_id, $origin_line_id, $qty, $array_options = 0) { - //phpcs:enable + //phpcs:enable + global $user; + $expeditionline = new ExpeditionLigne($this->db); $expeditionline->fk_expedition = $this->id; $expeditionline->entrepot_id = $entrepot_id; @@ -454,7 +456,7 @@ class Expedition extends CommonObject $expeditionline->qty = $qty; $expeditionline->array_options = $array_options; - if (($lineId = $expeditionline->insert()) < 0) + if (($lineId = $expeditionline->insert($user)) < 0) { $this->errors[]=$expeditionline->error; } @@ -528,6 +530,7 @@ class Expedition extends CommonObject if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1; $sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet as fk_project, e.billed"; + $sql.= ", e.date_valid"; $sql.= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height"; $sql.= ", e.date_expedition as date_expedition, e.model_pdf, e.fk_address, e.date_delivery"; $sql.= ", e.fk_shipping_method, e.tracking_number"; @@ -563,6 +566,7 @@ class Expedition extends CommonObject $this->statut = $obj->fk_statut; $this->user_author_id = $obj->fk_user_author; $this->date_creation = $this->db->jdate($obj->date_creation); + $this->date_valid = $this->db->jdate($obj->date_valid); $this->date = $this->db->jdate($obj->date_expedition); // TODO deprecated $this->date_expedition = $this->db->jdate($obj->date_expedition); // TODO deprecated $this->date_shipping = $this->db->jdate($obj->date_expedition); // Date real @@ -2552,7 +2556,7 @@ class ExpeditionLigne extends CommonObjectLine * @param int $notrigger 1 = disable triggers * @return int <0 if KO, line id >0 if OK */ - public function insert($user = null, $notrigger = 0) + public function insert($user, $notrigger = 0) { global $langs, $conf; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index a85c6fa4fa9..abcea896c06 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1650,7 +1650,7 @@ elseif ($id > 0 || ! empty($ref)) if ($conf->global->MAIN_FEATURE_LEVEL >=2 && $object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) { print '
'; // This feature is not yet implemented - print ''.$langs->trans("ChangeIntoRepeatableIntervention").''; + print ''.$langs->trans("ChangeIntoRepeatableIntervention").''; print '
'; } diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 08ec66f8ea3..bb92e41a537 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -217,6 +217,7 @@ ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must hav ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set. ErrorURLMustStartWithHttp=URL %s must start with http:// or https:// ErrorNewRefIsAlreadyUsed=Error, the new reference is already used +ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Error, delete payment linked to a closed invoice is not possible. # Warnings WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. WarningMandatorySetupNotComplete=Click here to setup mandatory parameters diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 6610d5d1bb1..6efbe942032 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -977,4 +977,5 @@ NoFilesUploadedYet=Please upload a document first SeePrivateNote=See private note PaymentInformation=Payment information ValidFrom=Valid from -ValidUntil=Valid until \ No newline at end of file +ValidUntil=Valid until +NoRecordedUsers=No users
'.$langs->trans("DateChequeReceived").''.$langs->trans("ChequeNumber")."'.$langs->trans("CheckTransmitter")."'.$langs->trans("Bank")."'.$langs->trans("Amount")."'.$langs->trans("Payment")."'.$langs->trans("LineRecord")."'.$langs->trans("Select")."
"; + print '
'.$langs->trans("DateChequeReceived").''.$langs->trans("ChequeNumber")."'.$langs->trans("CheckTransmitter")."'.$langs->trans("Bank")."'.$langs->trans("Amount")."'.$langs->trans("Payment")."'.$langs->trans("LineRecord")."'.$langs->trans("Select")."
"; if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").''; print '