diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 80a1dea140b..77932cf4e3d 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -535,7 +535,7 @@ if ($object->id > 0) { print ''; print ''; print ''; $return = array(); @@ -557,7 +557,7 @@ if ($object->id > 0) { print $productstatic->getNomUrl(1); print ''; print ''; print ''; print ''; @@ -693,7 +693,7 @@ if ($object->id > 0) { $num = $object_count->total; } - $sql = "SELECT p.rowid,p.ref, p.date_commande as dc, p.fk_statut, p.total_ht, p.total_tva, p.total_ttc"; + $sql = "SELECT p.rowid,p.ref, p.date_commande as date, p.fk_statut, p.total_ht, p.total_tva, p.total_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p"; $sql .= " WHERE p.fk_soc = ".((int) $object->id); $sql .= " AND p.entity IN (".getEntity('commande_fournisseur').")"; @@ -709,9 +709,9 @@ if ($object->id > 0) { print '
'.$langs->trans("ProductsAndServices").''; - print ''.$langs->trans("AllProductReferencesOfSupplier").''.$object->nbOfProductRefs().''; + print ''.$langs->trans("AllProductReferencesOfSupplier").''.$object->nbOfProductRefs().''; print '
'; - print $objp->supplier_ref; + print dol_escape_htmltag($objp->supplier_ref); print ''; print dol_trunc(dol_htmlentities($objp->label), 30); @@ -566,7 +566,7 @@ if ($object->id > 0) { print ''; //print (isset($objp->unitprice) ? price($objp->unitprice) : ''); if (isset($objp->price)) { - print price($objp->price); + print ''.price($objp->price).''; if ($objp->quantity > 1) { print ' / '; print $objp->quantity; @@ -609,7 +609,7 @@ if ($object->id > 0) { print '
'; print ''; - print ''; + print ''; print ''; print '
'.$langs->trans("LastSupplierProposals", ($num < $MAXLIST ? "" : $MAXLIST)).''.$langs->trans("AllPriceRequests").''.$num.''.$langs->trans("AllPriceRequests").''.$num.''.img_picto($langs->trans("Statistics"), 'stats').'
'; print '
'; print ''; - print ''; @@ -720,22 +720,23 @@ if ($object->id > 0) { while ($i < $num && $i < $MAXLIST) { $obj = $db->fetch_object($resql); - print ''; - print ''; + print ''; print ''; + print ''; print ''; print ''; $i++; @@ -759,7 +760,7 @@ if ($object->id > 0) { if ($user->rights->fournisseur->facture->lire) { // TODO move to DAO class - $sql = 'SELECT f.rowid, f.libelle as label, f.ref, f.ref_supplier, f.fk_statut, f.datef as df, f.total_ht, f.total_tva, f.total_ttc as amount,f.paye,'; + $sql = 'SELECT f.rowid, f.libelle as label, f.ref, f.ref_supplier, f.fk_statut, f.datef as df, f.total_ht, f.total_tva, f.total_ttc, f.paye,'; $sql .= ' SUM(pf.amount) as am'; $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn'; @@ -777,7 +778,8 @@ if ($object->id > 0) { print ''; print ''; @@ -786,8 +788,6 @@ if ($object->id > 0) { while ($i < min($num, $MAXLIST)) { $obj = $db->fetch_object($resql); - print ''; - print ''; + print ''; - print ''; - print ''; + print ''; + print ''; print ''; diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index 9a67c3922f0..a20e586e2ee 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -257,6 +257,7 @@ if ($resql) { $trackid = 'prod'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + print '
'; print '
'; + print ''; print ''; - print ''; + print ''; print ''; print '
'.$langs->trans("LastSupplierOrders", ($num < $MAXLIST ? "" : $MAXLIST)).''.$langs->trans("AllOrders").''.$num.''.$langs->trans("AllOrders").''.$num.''.img_picto($langs->trans("Statistics"), 'stats').'
'; print '
'; $orderstatic->id = $obj->rowid; $orderstatic->ref = $obj->ref; $orderstatic->total_ht = $obj->total_ht; $orderstatic->total_tva = $obj->total_tva; $orderstatic->total_ttc = $obj->total_ttc; + $orderstatic->date = $db->jdate($obj->date); + + print '
'; print $orderstatic->getNomUrl(1); print ''; - if ($obj->dc) { - print dol_print_date($db->jdate($obj->dc), 'day'); - } else { - print "-"; + if ($obj->date) { + print dol_print_date($orderstatic->date, 'day'); } print ''.price($orderstatic->total_ttc).''.$orderstatic->LibStatut($obj->fk_statut, 5).'
'; - print ''; + print '
'.$langs->trans('LastSuppliersBills', ($num <= $MAXLIST ? "" : $MAXLIST)).''.$langs->trans('AllBills').''.$num.'
'; + print ''; print ''; print '
'.$langs->trans('LastSuppliersBills', ($num <= $MAXLIST ? "" : $MAXLIST)).''.$langs->trans('AllBills').''.$num.''.img_picto($langs->trans("Statistics"), 'stats').'
'; print '
'; $facturestatic->id = $obj->rowid; $facturestatic->ref = ($obj->ref ? $obj->ref : $obj->rowid); $facturestatic->ref_supplier = $obj->ref_supplier; @@ -796,12 +796,16 @@ if ($object->id > 0) { $facturestatic->total_ht = $obj->total_ht; $facturestatic->total_tva = $obj->total_tva; $facturestatic->total_ttc = $obj->total_ttc; + $facturestatic->date = $db->jdate($obj->df); + + print '
'; print ''.$facturestatic->getNomUrl(1).''; print $obj->ref_supplier ? ' - '.$obj->ref_supplier : ''; print ($obj->label ? ' - ' : '').dol_trunc($obj->label, 14); print ''.dol_print_date($db->jdate($obj->df), 'day').''.price($obj->amount).''.dol_print_date($facturestatic->date, 'day').''.price($facturestatic->total_ttc).''; print $facturestatic->LibStatut($obj->paye, $obj->fk_statut, 5, $obj->am); print '
'; // Fields title search @@ -357,7 +358,7 @@ if ($resql) { } $db->free($resql); - print "
"; + print ""; print ''; } else {