From 5876582030c66ca817f0caa0ff3133703e711a78 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 May 2019 15:56:29 +0200 Subject: [PATCH] Fix responsive --- htdocs/commande/orderstoinvoice.php | 79 +++++++++++++++-------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index fe017a6b1aa..0d0b202a8c3 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Andreu Bisquerra Gaya @@ -50,14 +50,14 @@ $id = (GETPOST('id')?GETPOST('id', 'int'):GETPOST("facid", "int")); // For b $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); -$sref = GETPOST('sref'); -$sref_client = GETPOST('sref_client'); +$sref = GETPOST('sref', 'alpha'); +$sref_client = GETPOST('sref_client', 'alpha'); $sall = trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $socid = GETPOST('socid', 'int'); $selected = GETPOST('orders_to_invoice'); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); -$viewstatut = GETPOST('viewstatut'); +$viewstatut = GETPOST('viewstatut', 'alpha'); $error = 0; @@ -290,32 +290,32 @@ if (($action == 'create' || $action == 'add') && !$error) $array_options = $lines[$i]->array_options; } - $result = $object->addline( - $desc, - $lines[$i]->subprice, - $lines[$i]->qty, - $lines[$i]->tva_tx, - $lines[$i]->localtax1_tx, - $lines[$i]->localtax2_tx, - $lines[$i]->fk_product, - $lines[$i]->remise_percent, - $date_start, - $date_end, - 0, - $lines[$i]->info_bits, - $lines[$i]->fk_remise_except, - 'HT', - 0, - $product_type, - $ii, - $lines[$i]->special_code, - $object->origin, - $lines[$i]->rowid, - $fk_parent_line, - $lines[$i]->fk_fournprice, - $lines[$i]->pa_ht, - $lines[$i]->label, - $array_options + $result = $object->addline( + $desc, + $lines[$i]->subprice, + $lines[$i]->qty, + $lines[$i]->tva_tx, + $lines[$i]->localtax1_tx, + $lines[$i]->localtax2_tx, + $lines[$i]->fk_product, + $lines[$i]->remise_percent, + $date_start, + $date_end, + 0, + $lines[$i]->info_bits, + $lines[$i]->fk_remise_except, + 'HT', + 0, + $product_type, + $ii, + $lines[$i]->special_code, + $object->origin, + $lines[$i]->rowid, + $fk_parent_line, + $lines[$i]->fk_fournprice, + $lines[$i]->pa_ht, + $lines[$i]->label, + $array_options ); if ($result > 0) { @@ -578,9 +578,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) { $sql.= ' AND c.ref_client LIKE \'%'.$db->escape($sref_client).'%\''; } - $sql.= ' ORDER BY '.$sortfield.' '.$sortorder; - $resql = $db->query($sql); + $sql.= $db->order($sortfield, $sortorder); + $resql = $db->query($sql); if ($resql) { if ($socid) @@ -604,6 +604,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) print '

'.$companystatic->getNomUrl(1, 'customer').'

'; } + print '
'; print ''; print ''; print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.ref', '', '&socid='.$socid, '', $sortfield, $sortorder); @@ -618,8 +619,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) print ''; print ''; print ''; - print ''; @@ -668,11 +670,11 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) $generic_commande->date_livraison = $db->jdate($objp->date_livraison); print '
'; + //REF + print ''; print ''; print '
'; - print ''; - print '
'; + print ''; print $generic_commande->getNomUrl(1, 0); print ''; + print ''; if ($generic_commande->hasDelay()) { print img_picto($langs->trans("Late"), "warning"); } @@ -713,10 +715,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) $i++; } print '
'; + print '
'; - /* - * Boutons actions - */ + // Buttons actions print '
global->INVOICE_CLOSE_ORDERS_OFF_BY_DEFAULT_FORMASSINVOICE)?' checked="checked"':'').' name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically"); print '
'; print ''; @@ -726,7 +727,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) print ''; print '
'; print '
'; + print ''; + $db->free($resql); } else