Merge pull request #11336 from ptibogxiv/patch-186

Fix measuring_units_string display function
This commit is contained in:
Laurent Destailleur 2019-06-14 13:48:31 +02:00 committed by GitHub
commit 5cada6ee0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 127 additions and 119 deletions

View File

@ -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 '</td>';
print '<td>' . $objp->country .'</td>';
print '<td class="center">';
$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 '</td>';
print '<td>' . $objp->tva_intra . '</td>';
@ -529,7 +532,7 @@ if ($result) {
print '</td>';
// Suggested accounting account
print '<td class="center">';
print '<td>';
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';

View File

@ -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 '</td>';
// Current account
print '<td class="center">';
print '<td>';
print length_accountg(html_entity_decode($objp->code_buy));
print '</td>';

View File

@ -987,15 +987,14 @@ if (empty($action) || $action == 'view') {
print '<div class="div-table-responsive">';
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print "<td></td>";
print "<td>" . $langs->trans("Date") . "</td>";
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("ObjectsRef") . ")</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
print "<td>" . $langs->trans("LabelOperation") . "</td>";
print "<td>" . $langs->trans("PaymentMode") . "</td>";
print "<td class='right'>" . $langs->trans("Debit") . "</td>";
print "<td class='right'>" . $langs->trans("Credit") . "</td>";
print '<td class="center">' . $langs->trans("PaymentMode") . "</td>";
print '<td class="right">' . $langs->trans("Debit") . "</td>";
print '<td class="right">' . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$r = '';
@ -1019,7 +1018,6 @@ if (empty($action) || $action == 'view') {
//var_dump($tabpay[$key]);
print '<!-- Bank bank.rowid='.$key.' type='.$tabpay[$key]['type'].' ref='.$tabpay[$key]['ref'].'-->';
print '<tr class="oddeven">';
print "<td></td>";
print "<td>" . $date . "</td>";
print "<td>" . $ref . "</td>";
// Ledger account
@ -1043,9 +1041,9 @@ if (empty($action) || $action == 'view') {
print "<td>";
print $reflabel;
print "</td>";
print "<td>" . $val["type_payment"] . "</td>";
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="center">' . $val["type_payment"] . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
}
@ -1061,7 +1059,6 @@ if (empty($action) || $action == 'view') {
print '<!-- Thirdparty bank.rowid='.$key.' -->';
print '<tr class="oddeven">';
print "<td></td>";
print "<td>" . $date . "</td>";
print "<td>" . $ref . "</td>";
// Ledger account
@ -1125,9 +1122,9 @@ if (empty($action) || $action == 'view') {
}
print "</td>";
print "<td>" . $reflabel . "</td>";
print "<td>" . $val["type_payment"] . "</td>";
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="center">' . $val["type_payment"] . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
}
}
@ -1141,7 +1138,6 @@ if (empty($action) || $action == 'view') {
print '<!-- Wait bank.rowid='.$key.' -->';
print '<tr class="oddeven">';
print "<td></td>";
print "<td>" . $date . "</td>";
print "<td>" . $ref . "</td>";
// Ledger account
@ -1162,9 +1158,9 @@ if (empty($action) || $action == 'view') {
*/
print "</td>";
print "<td>" . $reflabel . "</td>";
print "<td>" . $val["type_payment"] . "</td>";
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="center">' . $val["type_payment"] . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
}
}

View File

@ -549,14 +549,13 @@ if (empty($action) || $action == 'view') {
print '<div class="div-table-responsive">';
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print "<td></td>";
print "<td>" . $langs->trans("Date") . "</td>";
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("ExpenseReportRef") . ")</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
print "<td>" . $langs->trans("LabelOperation") . "</td>";
print "<td class='right'>" . $langs->trans("Debit") . "</td>";
print "<td class='right'>" . $langs->trans("Credit") . "</td>";
print '<td class="right">' . $langs->trans("Debit") . "</td>";
print '<td class="right">' . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$r = '';
@ -578,7 +577,7 @@ if (empty($action) || $action == 'view') {
if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- Fees --></td>";
print "<!-- Fees -->";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
$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 "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $accountingaccount->label . "</td>";
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
}
// Third party
foreach ($tabttc[$key] as $k => $mt) {
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
$userstatic->id = $tabuser[$key]['id'];
$userstatic->name = $tabuser[$key]['name'];
print '<tr class="oddeven">';
print "<!-- Thirdparty -->";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT);
@ -631,8 +631,8 @@ if (empty($action) || $action == 'view') {
else print $accountoshow;
print '</td>';
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
print '<td class="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
}
@ -646,7 +646,7 @@ if (empty($action) || $action == 'view') {
foreach ($arrayofvat[$key] as $k => $mt) {
if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<!-- VAT -->";
print "<td>" . $date . "</td>";
print "<td>" . $expensereportstatic->getNomUrl(1) . "</td>";
// Account
@ -663,8 +663,8 @@ if (empty($action) || $action == 'view') {
print '</td>';
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
print "</td>";
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
}

View File

@ -783,14 +783,13 @@ if (empty($action) || $action == 'view') {
print '<div class="div-table-responsive">';
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print "<td></td>";
print "<td>" . $langs->trans("Date") . "</td>";
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
print "<td>" . $langs->trans("LabelOperation") . "</td>";
print "<td class='right'>" . $langs->trans("Debit") . "</td>";
print "<td class='right'>" . $langs->trans("Credit") . "</td>";
print '<td class="center">' . $langs->trans("Debit") . "</td>";
print '<td class="center">' . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$r = '';
@ -830,7 +829,7 @@ if (empty($action) || $action == 'view') {
if ($replacedinvoice == 1)
{
print '<tr class="oddeven">';
print "<td><!-- Replaced invoice --></td>";
print "<!-- Replaced invoice -->";
print "<td>" . $date . "</td>";
print "<td><strike>" . $invoicestatic->getNomUrl(1) . "</strike></td>";
// Account
@ -851,7 +850,7 @@ if (empty($action) || $action == 'view') {
if ($errorforinvoice[$key] == 'somelinesarenotbound')
{
print '<tr class="oddeven">';
print "<td><!-- Some lines are not bound --></td>";
print "<!-- Some lines are not bound -->";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
@ -872,7 +871,7 @@ if (empty($action) || $action == 'view') {
foreach ($tabttc[$key] as $k => $mt) {
//if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<!-- Thirdparty -->";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
@ -894,8 +893,8 @@ if (empty($action) || $action == 'view') {
else print $accountoshow;
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
print '<td class="right">'. ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">'. ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
//}
}
@ -907,7 +906,7 @@ if (empty($action) || $action == 'view') {
//if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- Product --></td>";
print "<!-- Product -->";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
@ -925,8 +924,8 @@ if (empty($action) || $action == 'view') {
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $accountingaccount->label . "</td>";
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
//}
}
@ -941,7 +940,7 @@ if (empty($action) || $action == 'view') {
foreach ($arrayofvat[$key] as $k => $mt) {
if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<!-- VAT -->";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
@ -959,8 +958,8 @@ if (empty($action) || $action == 'view') {
print "<td>";
print $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
print "</td>";
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
}
@ -972,7 +971,7 @@ if (empty($action) || $action == 'view') {
foreach ($tabother[$key] as $k => $mt) {
if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- VAT counterpart NPR --></td>";
print "<!-- VAT counterpart NPR -->";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
@ -988,8 +987,8 @@ if (empty($action) || $action == 'view') {
print "<td>";
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT") . " NPR (counterpart)</td>";
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
}
}

View File

@ -720,14 +720,13 @@ if (empty($action) || $action == 'view') {
print '<div class="div-table-responsive">';
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print "<td></td>";
print "<td>" . $langs->trans("Date") . "</td>";
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
print "<td>" . $langs->trans("LabelOperation") . "</td>";
print "<td class='right'>" . $langs->trans("Debit") . "</td>";
print "<td class='right'>" . $langs->trans("Credit") . "</td>";
print '<td class="center">' . $langs->trans("Debit") . "</td>";
print '<td class="center">' . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$r = '';
@ -765,7 +764,7 @@ if (empty($action) || $action == 'view') {
if ($replacedinvoice == 1)
{
print '<tr class="oddeven">';
print "<td><!-- Replaced invoice --></td>";
print "<!-- Replaced invoice -->";
print "<td>" . $date . "</td>";
print "<td><strike>" . $invoicestatic->getNomUrl(1) . "</strike></td>";
// Account
@ -786,7 +785,7 @@ if (empty($action) || $action == 'view') {
if ($errorforinvoice[$key] == 'somelinesarenotbound')
{
print '<tr class="oddeven">';
print "<td><!-- Some lines are not bound --></td>";
print "<!-- Some lines are not bound -->";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
@ -808,7 +807,7 @@ if (empty($action) || $action == 'view') {
{
//if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<!-- Thirdparty -->";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
@ -830,8 +829,8 @@ if (empty($action) || $action == 'view') {
else print $accountoshow;
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
//}
}
@ -844,7 +843,7 @@ if (empty($action) || $action == 'view') {
//if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- Product --></td>";
print "<!-- Product -->";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
@ -862,8 +861,8 @@ if (empty($action) || $action == 'view') {
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $accountingaccount->label . "</td>";
print "<td class='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "<td class='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
//}
}
@ -879,7 +878,7 @@ if (empty($action) || $action == 'view') {
foreach ($arrayofvat[$key] as $k => $mt) {
if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<!-- VAT -->";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
@ -896,8 +895,8 @@ if (empty($action) || $action == 'view') {
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT"). ' '.join(', ', $def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
print "</td>";
print '<td class="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
}
}

View File

@ -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 '</td>';
print '<td>' . $objp->country .'</td>';
print '<td class="center">';
$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 '</td>';
print '<td>' . $objp->tva_intra . '</td>';
// Current account
@ -516,7 +520,7 @@ if ($result) {
print '</td>';
// Suggested accounting account
print '<td class="center">';
print '<td>';
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';

View File

@ -1645,7 +1645,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// Contact of order
if ($socid > 0) {
print "<tr><td>" . $langs->trans("DefaultContact") . '</td><td>';
$form->select_contacts($soc->id, $setcontact, 'contactid', 1, $srccontactslist);
$form->select_contacts($soc->id, $setcontact, 'contactid', 1, $srccontactslist, '', 1);
print '</td></tr>';
// Ligne info remises tiers

View File

@ -217,7 +217,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
}
print "</td>";
print '<td class="right" class="borderrightlight" width="10%">&nbsp;';
print '<td class="right borderrightlight" width="10%">&nbsp;';
if ($encaiss[$case]>0)
{
print price($encaiss[$case]);
@ -232,7 +232,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
print '<tr class="liste_total"><td><b>'.$langs->trans("Total")."</b></td>";
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
print '<td class="right"><b>'.price($totsorties[$annee]).'</b></td><td class="right"><b>'.price($totentrees[$annee]).'</b></td>';
print '<td class="right nowraponall"><b>'.price($totsorties[$annee]).'</b></td><td class="right nowraponall"><b>'.price($totentrees[$annee]).'</b></td>';
}
print "</tr>\n";

View File

@ -935,18 +935,18 @@ if ($resql)
print '<tr class="liste_titre">';
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

View File

@ -594,7 +594,7 @@ if (isset($totalarray['totalbalancefield']) && $lastcurrencycode != 'various') /
if ($num < $limit && empty($offset)) print '<td class="left">'.$langs->trans("Total").'</td>';
else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
}
elseif ($totalarray['totalbalancefield'] == $i) print '<td class="right">'.price($totalarray['totalbalance'], 0, $langs, 0, 0, -1, $lastcurrencycode).'</td>';
elseif ($totalarray['totalbalancefield'] == $i) print '<td class="right">'.price($totalarray['totalbalance'], 0, $langs, 0, -1, -1, $lastcurrencycode).'</td>';
else print '<td></td>';
}
print '</tr>';

View File

@ -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;

View File

@ -472,14 +472,14 @@ if ($action == 'new')
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
print '<td style="min-width: 120px">'.$langs->trans("DateChequeReceived").'</td>'."\n";
print '<td style="min-width: 120px">'.$langs->trans("ChequeNumber")."</td>\n";
print '<td style="min-width: 200px">'.$langs->trans("CheckTransmitter")."</td>\n";
print '<td style="min-width: 200px">'.$langs->trans("Bank")."</td>\n";
print '<td class="right" width="100px">'.$langs->trans("Amount")."</td>\n";
print '<td align="center" width="100px">'.$langs->trans("Payment")."</td>\n";
print '<td align="center" width="100px">'.$langs->trans("LineRecord")."</td>\n";
print '<td align="center" width="100px">'.$langs->trans("Select")."<br>";
print '<td>'.$langs->trans("DateChequeReceived").'</td>'."\n";
print '<td>'.$langs->trans("ChequeNumber")."</td>\n";
print '<td>'.$langs->trans("CheckTransmitter")."</td>\n";
print '<td>'.$langs->trans("Bank")."</td>\n";
print '<td>'.$langs->trans("Amount")."</td>\n";
print '<td class="center">'.$langs->trans("Payment")."</td>\n";
print '<td class="center">'.$langs->trans("LineRecord")."</td>\n";
print '<td class="center">'.$langs->trans("Select")."<br>";
if ($conf->use_javascript_ajax) print '<a href="#" id="checkall_'.$bid.'">'.$langs->trans("All").'</a> / <a href="#" id="checknone_'.$bid.'">'.$langs->trans("None").'</a>';
print '</td>';
print "</tr>\n";

View File

@ -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,
);

View File

@ -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),
);

View File

@ -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).'<br>'.$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),
);

View File

@ -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
);

View File

@ -716,12 +716,13 @@ class FormCompany
}
}
print "</select>\n";
print ajax_combobox($htmlname);
return $firstCompany;
}
else
{
dol_print_error($this->db);
print 'Error sql';
return 0;
}
}
}

View File

@ -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)

View File

@ -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)
{

View File

@ -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
));

View File

@ -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;

View File

@ -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 '<div class="inline-block divButAction">';
// This feature is not yet implemented
print '<a class="butAction" title="'.$langs->trans("not yet implemented").'" href="/fichinter/card-rec.php?id='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableIntervention").'</a>';
print '<a class="butAction" title="'.$langs->trans("not yet implemented").'" href="'.DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$object->id.'&action=create">'.$langs->trans("ChangeIntoRepeatableIntervention").'</a>';
print '</div>';
}

View File

@ -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

View File

@ -977,4 +977,5 @@ NoFilesUploadedYet=Please upload a document first
SeePrivateNote=See private note
PaymentInformation=Payment information
ValidFrom=Valid from
ValidUntil=Valid until
ValidUntil=Valid until
NoRecordedUsers=No users