diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 3549651cbd6..c0a59689140 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014-2016 Florian Henry - * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -103,13 +103,13 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both if (is_array($changeaccount) && count($changeaccount) > 0) { $error = 0; - + $db->begin(); - + $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as l"; $sql1 .= " SET l.fk_code_ventilation=" . $account_parent; $sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')'; - + dol_syslog('accountancy/customer/lines.php::changeaccount sql= ' . $sql1); $resql1 = $db->query($sql1); if (! $resql1) { @@ -223,7 +223,7 @@ $result = $db->query($sql); if ($result) { $num_lines = $db->num_rows($result); $i = 0; - + $param = ""; if ($search_invoice) $param .= "&search_invoice=" . $search_invoice; @@ -242,17 +242,17 @@ if ($result) { if ($search_tvaintra) $param .= "&search_tvaintra=" . $search_tvaintra; - + print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords); print '' . $langs->trans("DescVentilDoneCustomer") . ''; - + print '
'; print ''; - + print '
' . $langs->trans("ChangeAccount") . '
'; print $formventilation->select_account($account_parent, 'account_parent', 1); print '
'; - + print ''; print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); @@ -265,7 +265,7 @@ if ($result) { print_liste_field_titre($langs->trans("IntracommunityVATNumber"), $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Ventilate") . '
/', '', '', '', '', 'align="center"'); print "\n"; - + print ''; print ''; print ''; @@ -279,22 +279,22 @@ if ($result) { print '\n"; - + $facture_static = new Facture($db); $product_static = new Product($db); - + $var = True; while ( $objp = $db->fetch_object($result) ) { $var = ! $var; $codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte; - + print ''; - + // Ref Invoice $facture_static->ref = $objp->facnumber; - $facture_static->id = $objp->facid; + $facture_static->id = $objp->rowid; print ''; - + // Ref Product $product_static->ref = $objp->product_ref; $product_static->id = $objp->product_id; @@ -305,7 +305,7 @@ if ($result) { else print ' '; print ''; - + print ''; print ''; print ''; @@ -316,7 +316,7 @@ if ($result) { print ''; print ''; print ''; - + print ""; $i ++; }
'; print ''; print "
' . $facture_static->getNomUrl(1) . '' . dol_trunc($objp->product_label, 24) . '' . nl2br(dol_trunc($objp->description, 32)) . '' . price($objp->total_ht) . '' . $objp->country .'' . $objp->tva_intra . '