Fix responsive

This commit is contained in:
Laurent Destailleur 2022-01-14 20:26:56 +01:00
parent 22ef83ab67
commit 6acf59fe20
2 changed files with 25 additions and 20 deletions

View File

@ -535,7 +535,7 @@ if ($object->id > 0) {
print '<table class="noborder centpercent lastrecordtable">';
print '<tr class="liste_titre'.(($num == 0) ? ' nobottom' : '').'">';
print '<td colspan="3">'.$langs->trans("ProductsAndServices").'</td><td class="right">';
print '<a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/product/list.php?fourn_id='.$object->id.'">'.$langs->trans("AllProductReferencesOfSupplier").'<span class="badge marginleftonlyshort">'.$object->nbOfProductRefs().'</span>';
print '<a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/product/list.php?fourn_id='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans("AllProductReferencesOfSupplier").'</span><span class="badge marginleftonlyshort">'.$object->nbOfProductRefs().'</span>';
print '</a></td></tr>';
$return = array();
@ -557,7 +557,7 @@ if ($object->id > 0) {
print $productstatic->getNomUrl(1);
print '</td>';
print '<td>';
print $objp->supplier_ref;
print dol_escape_htmltag($objp->supplier_ref);
print '</td>';
print '<td class="maxwidthonsmartphone">';
print dol_trunc(dol_htmlentities($objp->label), 30);
@ -566,7 +566,7 @@ if ($object->id > 0) {
print '<td class="right">';
//print (isset($objp->unitprice) ? price($objp->unitprice) : '');
if (isset($objp->price)) {
print price($objp->price);
print '<span class="amount">'.price($objp->price).'</span>';
if ($objp->quantity > 1) {
print ' / ';
print $objp->quantity;
@ -609,7 +609,7 @@ if ($object->id > 0) {
print '<tr class="liste_titre">';
print '<td colspan="3">';
print '<table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastSupplierProposals", ($num < $MAXLIST ? "" : $MAXLIST)).'</td>';
print '<td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?socid='.$object->id.'">'.$langs->trans("AllPriceRequests").'<span class="badge marginleftonlyshort">'.$num.'</span></td>';
print '<td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?socid='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans("AllPriceRequests").'</span><span class="badge marginleftonlyshort">'.$num.'</span></td>';
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/supplier_proposal/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
print '</tr></table>';
print '</td></tr>';
@ -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 '<table class="noborder centpercent lastrecordtable">';
print '<tr class="liste_titre">';
print '<td colspan="3">';
print '<td colspan="4">';
print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans("LastSupplierOrders", ($num < $MAXLIST ? "" : $MAXLIST)).'</td>';
print '<td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/commande/list.php?socid='.$object->id.'">'.$langs->trans("AllOrders").'<span class="badge marginleftonlyshort">'.$num.'</span></td>';
print '<td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/commande/list.php?socid='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans("AllOrders").'</span><span class="badge marginleftonlyshort">'.$num.'</span></td>';
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
print '</tr></table>';
print '</td></tr>';
@ -720,22 +720,23 @@ if ($object->id > 0) {
while ($i < $num && $i < $MAXLIST) {
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
print '<td class="nowrap">';
$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 '<tr class="oddeven">';
print '<td class="nowraponall">';
print $orderstatic->getNomUrl(1);
print '</td>';
print '<td class="center" width="80">';
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 '</td>';
print '<td class="right nowrap"><span class="amount">'.price($orderstatic->total_ttc).'</span></td>';
print '<td class="right" class="nowrap">'.$orderstatic->LibStatut($obj->fk_statut, 5).'</td>';
print '</tr>';
$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 '<tr class="liste_titre">';
print '<td colspan="4">';
print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans('LastSuppliersBills', ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->id.'">'.$langs->trans('AllBills').'<span class="badge marginleftonlyshort">'.$num.'</span></td>';
print '<table class="nobordernopadding" width="100%"><tr><td>'.$langs->trans('LastSuppliersBills', ($num <= $MAXLIST ? "" : $MAXLIST)).'</td>';
print '<td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans('AllBills').'</span><span class="badge marginleftonlyshort">'.$num.'</span></td>';
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?mode=supplier&socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
print '</tr></table>';
print '</td></tr>';
@ -786,8 +788,6 @@ if ($object->id > 0) {
while ($i < min($num, $MAXLIST)) {
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
print '<td>';
$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 '<tr class="oddeven">';
print '<td class="tdoverflowmax200">';
print '<span class="nowraponall">'.$facturestatic->getNomUrl(1).'</span>';
print $obj->ref_supplier ? ' - '.$obj->ref_supplier : '';
print ($obj->label ? ' - ' : '').dol_trunc($obj->label, 14);
print '</td>';
print '<td class="center nowrap">'.dol_print_date($db->jdate($obj->df), 'day').'</td>';
print '<td class="right nowrap">'.price($obj->amount).'</td>';
print '<td class="center nowrap">'.dol_print_date($facturestatic->date, 'day').'</td>';
print '<td class="right nowrap"><span class="amount">'.price($facturestatic->total_ttc).'</span></td>';
print '<td class="right nowrap">';
print $facturestatic->LibStatut($obj->paye, $obj->fk_statut, 5, $obj->am);
print '</td>';

View File

@ -257,6 +257,7 @@ if ($resql) {
$trackid = 'prod'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
print '<div class="div-table-responsive-no-min">';
print '<table class="liste centpercent">';
// Fields title search
@ -357,7 +358,7 @@ if ($resql) {
}
$db->free($resql);
print "</table>";
print "</table></div>";
print '</form>';
} else {