diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index bdff801393c..177ce4b2f26 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -37,6 +37,7 @@ $langs->load("bills"); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); +$rowid=GETPOST('rowid','int'); $action=GETPOST('action', 'alpha'); $socid=GETPOST('socid', 'int'); $error=0; $mesg = ''; @@ -77,16 +78,16 @@ if ($action == 'remove_pf') $product = new ProductFournisseur($db); if ($product->fetch($id) > 0) { - if ($_GET["rowid"]) + if ($rowid) { - $result=$product->remove_product_fournisseur_price($_GET["rowid"]); + $result=$product->remove_product_fournisseur_price($rowid); $action = ''; $mesg = '
| '.$langs->trans("Supplier").' | '; - if ($_GET["rowid"]) + if ($rowid) { $supplier=new Fournisseur($db); $supplier->fetch($socid); print $supplier->getNomUrl(1); print ''; print ''; - print ''; + print ''; } else { @@ -297,7 +298,7 @@ if ($id || $ref) // Ref supplier print ' | |||||
| '.$langs->trans("SupplierRef").' | '; - if ($_GET["rowid"]) + if ($rowid) { print $product->fourn_ref; } @@ -328,8 +329,8 @@ if ($id || $ref) print ' | |||||
| '.$langs->trans("QtyMin").' | '; print ''; - $quantity = $_REQUEST["qty"] ? $_REQUEST["qty"] : "1"; - if ($_GET["rowid"]) + $quantity = GETPOST('qty') ? GETPOST('qty') : "1"; + if ($rowid) { print ''; print $product->fourn_qty; @@ -342,18 +343,18 @@ if ($id || $ref) // Price qty min print ' | '.$langs->trans("PriceQtyMin").' | '; - print 'fourn_price)?price($product->fourn_price):'')).'">'; + print ' | '; print ' '; - print $form->select_PriceBaseType(($_POST["price_base_type"]?$_POST["price_base_type"]:$product->price_base_type), "price_base_type"); + print $form->select_PriceBaseType((GETPOST('price_base_type')?GETPOST('price_base_type'):$product->price_base_type), "price_base_type"); print ' | '; print '||
| '.$langs->trans("Charges").' | '; - print 'fourn_charges)).'">'; + print ' | '; print ' | '; print ''.$langs->trans("VATRate").' | '; print ''.$langs->trans("PriceQtyMinHT").' | '; // Charges ???? - if (! empty($conf->global->PRODUCT_LOAD)) print ''.$langs->trans("Charges").' | '; + if (! empty($conf->margin->enabled)) print ''.$langs->trans("Charges").' | '; print_liste_field_titre($langs->trans("UnitPriceHT"),$_SERVER["PHP_SELF"],"pfp.unitprice","",$param,'align="right"',$sortfield,$sortorder); // Charges ???? - if (! empty($conf->global->PRODUCT_LOAD)) print ''.$langs->trans("UnitCharges").' | '; + if (! empty($conf->margin->enabled)) print ''.$langs->trans("UnitCharges").' | '; print ''; print "\n"; @@ -453,7 +454,7 @@ if ($id || $ref) print ''; // Charges ???? - if (! empty($conf->global->PRODUCT_LOAD)) + if (! empty($conf->margin->enabled)) { print ' | '; print $productfourn->fourn_charges?price($productfourn->fourn_charges):""; @@ -467,7 +468,7 @@ if ($id || $ref) print ' | '; // Unit Charges ??? - if (! empty($conf->global->PRODUCT_LOAD)) + if (! empty($conf->margin->enabled)) { print ''; print $productfourn->fourn_unitcharges?price($productfourn->fourn_unitcharges) : ($productfourn->fourn_qty?price($productfourn->fourn_charges/$productfourn->fourn_qty):" "); |