diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 162425c8037..fc5a015e820 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -1210,7 +1210,9 @@ if ($object->id > 0) { // print $formfile->getDocumentsLink($contrat->element, $filename, $filedir); print $late; print "\n"; - print ''.dol_trunc($objp->refsup, 12)."\n"; + print ''; + print dol_trunc(strtolower(get_class($object)) == strtolower(Client::class) ? $objp->refcus : $objp->refsup, 12); + print "\n"; //print ''.dol_print_date($db->jdate($objp->dc), 'day')."\n"; print ''.dol_print_date($db->jdate($objp->dcon), 'day')."\n"; print ' '; @@ -1422,7 +1424,7 @@ if ($object->id > 0) { * Latest invoices */ if (isModEnabled('invoice') && $user->hasRight('facture', 'lire')) { - $sql = 'SELECT f.rowid as facid, f.ref, f.type'; + $sql = 'SELECT f.rowid as facid, f.ref, f.type, f.ref_client'; $sql .= ', f.total_ht'; $sql .= ', f.total_tva'; $sql .= ', f.total_ttc'; @@ -1452,6 +1454,9 @@ if ($object->id > 0) { if (getDolGlobalString('MAIN_SHOW_PRICE_WITH_TAX_IN_SUMMARIES')) { $colspan++; } + if (getDolGlobalString('MAIN_SHOW_REF_CUSTOMER_INVOICES')) { + $colspan++; + } print ''; print ''; print ''; @@ -1466,6 +1471,7 @@ if ($object->id > 0) { $facturestatic->id = $objp->facid; $facturestatic->ref = $objp->ref; + $facturestatic->ref_client = $objp->ref_client; $facturestatic->type = $objp->type; $facturestatic->total_ht = $objp->total_ht; $facturestatic->total_tva = $objp->total_tva; @@ -1511,6 +1517,11 @@ if ($object->id > 0) { // $urlsource = '/compta/facture/card.php?id='.$objp->cid; //print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir); print ''; + if (getDolGlobalString('MAIN_SHOW_REF_CUSTOMER_INVOICES')) { + print ''; + } if ($objp->df > 0) { print ''; } else { @@ -1521,6 +1532,7 @@ if ($object->id > 0) { } else { print ''; } + print '';
'.$langs->trans("LastCustomersBills", ($num <= $MAXLIST ? "" : $MAXLIST)).''.$langs->trans("AllBills").''.$num.''.img_picto($langs->trans("Statistics"), 'stats').''; + print $objp->ref_client; + print ''.dol_print_date($db->jdate($objp->df), 'day').'!!!'; print price($objp->total_ht); print '