Fix tooltips on thirdparty and invoice
This commit is contained in:
parent
59ed23069c
commit
ebc76b5f27
@ -526,13 +526,13 @@ if ($action == 'exportcsv') {
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
$companystatic->client = $tabcompany[$key]['code_client'];
|
||||
$companystatic->fournisseur = 1;
|
||||
|
||||
$invoicestatic->id = $key;
|
||||
$invoicestatic->ref = $val["ref"];
|
||||
$invoicestatic->ref = $val["refsologest"];
|
||||
$invoicestatic->refsupplier = $val["refsuppliersologest"];
|
||||
$invoicestatic->ref_supplier = $val["refsuppliersologest"];
|
||||
$invoicestatic->type = $val["type"];
|
||||
$invoicestatic->description = dol_trunc($val["description"], 32);
|
||||
$invoicestatic->description = dol_trunc(html_entity_decode($val["description"]), 32);
|
||||
|
||||
$date = dol_print_date($val["date"], 'day');
|
||||
|
||||
@ -699,15 +699,19 @@ if (empty($action) || $action == 'view') {
|
||||
$invoicestatic = new FactureFournisseur($db);
|
||||
$companystatic = new Fournisseur($db);
|
||||
|
||||
foreach ( $tabfac as $key => $val ) {
|
||||
foreach ( $tabfac as $key => $val )
|
||||
{
|
||||
$invoicestatic->id = $key;
|
||||
$invoicestatic->ref = $val["ref"];
|
||||
$invoicestatic->type = $val["type"];
|
||||
|
||||
$invoicestatic->ref = $val["refsologest"];
|
||||
$invoicestatic->refsupplier = $val["refsuppliersologest"];
|
||||
$invoicestatic->ref_supplier = $val["refsuppliersologest"];
|
||||
$invoicestatic->description = dol_trunc(html_entity_decode($val["description"]), 32);
|
||||
|
||||
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
||||
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
||||
$companystatic->fournisseur = 1;
|
||||
|
||||
$date = dol_print_date($val["date"], 'day');
|
||||
|
||||
@ -717,9 +721,6 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
$companystatic->supplier_code = $tabcompany[$key]['code_supplier'];
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
|
||||
@ -738,7 +739,7 @@ if (empty($action) || $action == 'view') {
|
||||
}
|
||||
else print $accountoshow;
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
@ -768,7 +769,7 @@ if (empty($action) || $action == 'view') {
|
||||
print '</td>';
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $accountingaccount->label . "</td>";
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $accountingaccount->label . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
@ -801,7 +802,7 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td>";
|
||||
print '</td>';
|
||||
print "<td>";
|
||||
print $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
|
||||
print $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
|
||||
print "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
@ -814,13 +815,11 @@ if (empty($action) || $action == 'view') {
|
||||
if (is_array($tabother[$key]))
|
||||
{
|
||||
foreach ( $tabother[$key] as $k => $mt ) {
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT counterpart NPR --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
$companystatic->supplier_code = $tabcompany[$key]['code_supplier'];
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accountg($k);
|
||||
@ -833,7 +832,7 @@ if (empty($action) || $action == 'view') {
|
||||
// Subledger account
|
||||
print "<td>";
|
||||
print '</td>';
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT") . " NPR (counterpart)</td>";
|
||||
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT") . " NPR (counterpart)</td>";
|
||||
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
|
||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
|
||||
@ -240,7 +240,6 @@ if ($action == 'writebookkeeping') {
|
||||
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
||||
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
||||
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
||||
$companystatic->client = $tabcompany[$key]['code_client'];
|
||||
|
||||
$invoicestatic->id = $key;
|
||||
$invoicestatic->ref = (string) $val["ref"];
|
||||
@ -480,7 +479,10 @@ if ($action == 'exportcsv') {
|
||||
{
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
$companystatic->client = $tabcompany[$key]['code_client'];
|
||||
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
||||
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
||||
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
||||
$companystatic->code_fournisseur = $tabcompany[$key]['code_supplier'];
|
||||
|
||||
$invoicestatic->id = $key;
|
||||
$invoicestatic->ref = $val["ref"];
|
||||
@ -632,11 +634,20 @@ if (empty($action) || $action == 'view') {
|
||||
$invoicestatic = new Facture($db);
|
||||
$companystatic = new Client($db);
|
||||
|
||||
foreach ( $tabfac as $key => $val ) {
|
||||
foreach ( $tabfac as $key => $val )
|
||||
{
|
||||
$invoicestatic->id = $key;
|
||||
$invoicestatic->ref = $val["ref"];
|
||||
$invoicestatic->type = $val["type"];
|
||||
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
|
||||
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
|
||||
$companystatic->code_client = $tabcompany[$key]['code_client'];
|
||||
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
|
||||
$companystatic->client = 3;
|
||||
|
||||
$date = dol_print_date($val["date"], 'day');
|
||||
|
||||
// Third party
|
||||
@ -645,9 +656,6 @@ if (empty($action) || $action == 'view') {
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
$companystatic->customer_code = $tabcompany[$key]['code_client'];
|
||||
// Account
|
||||
print "<td>";
|
||||
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
|
||||
|
||||
@ -1965,12 +1965,12 @@ class Societe extends CommonObject
|
||||
$label.= '<br><b>' . $langs->trans('Country') . ':</b> '. $this->country_code;
|
||||
if (! empty($this->tva_intra))
|
||||
$label.= '<br><b>' . $langs->trans('VATIntra') . ':</b> '. $this->tva_intra;
|
||||
if (! empty($this->code_client) && $this->client)
|
||||
if (! empty($this->code_client) && $this->client)
|
||||
$label.= '<br><b>' . $langs->trans('CustomerCode') . ':</b> '. $this->code_client;
|
||||
if (! empty($this->code_fournisseur) && $this->fournisseur)
|
||||
$label.= '<br><b>' . $langs->trans('SupplierCode') . ':</b> '. $this->code_fournisseur;
|
||||
if (! empty($conf->accounting->enabled) && $this->client)
|
||||
$label.= '<br><b>' . $langs->trans('CustomerAccountancyCode') . ':</b> '. $this->code_compta_client;
|
||||
$label.= '<br><b>' . $langs->trans('CustomerAccountancyCode') . ':</b> '. ($this->code_compta ? $this->code_compta : $this->code_compta_client);
|
||||
if (! empty($conf->accounting->enabled) && $this->fournisseur)
|
||||
$label.= '<br><b>' . $langs->trans('SupplierAccountancyCode') . ':</b> '. $this->code_compta_fournisseur;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user