Merge pull request #13224 from mapiolca/patch-38
# Fix Compatibility with NOTMODIFYOTHERENTITYFOURNPRICE const.
This commit is contained in:
commit
ef86311639
@ -7,6 +7,7 @@
|
|||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
|
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -590,7 +591,7 @@ class ProductFournisseur extends Product
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,";
|
$sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,";
|
||||||
$sql.= " pfp.rowid as product_fourn_pri_id, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_product as product_fourn_id, pfp.fk_supplier_price_expression,";
|
$sql.= " pfp.rowid as product_fourn_pri_id, pfp.entity, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_product as product_fourn_id, pfp.fk_supplier_price_expression,";
|
||||||
$sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation,";
|
$sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation,";
|
||||||
$sql.= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code, pfp.datec, pfp.tms,";
|
$sql.= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code, pfp.datec, pfp.tms,";
|
||||||
$sql.= " pfp.barcode, pfp.fk_barcode_type";
|
$sql.= " pfp.barcode, pfp.fk_barcode_type";
|
||||||
@ -616,6 +617,7 @@ class ProductFournisseur extends Product
|
|||||||
|
|
||||||
$prodfourn->product_fourn_price_id = $record["product_fourn_pri_id"];
|
$prodfourn->product_fourn_price_id = $record["product_fourn_pri_id"];
|
||||||
$prodfourn->product_fourn_id = $record["product_fourn_id"];
|
$prodfourn->product_fourn_id = $record["product_fourn_id"];
|
||||||
|
$prodfourn->product_fourn_entity = $record["entity"];
|
||||||
$prodfourn->fourn_ref = $record["ref_fourn"];
|
$prodfourn->fourn_ref = $record["ref_fourn"];
|
||||||
$prodfourn->ref_supplier = $record["ref_fourn"];
|
$prodfourn->ref_supplier = $record["ref_fourn"];
|
||||||
$prodfourn->desc_supplier = $record["desc_fourn"];
|
$prodfourn->desc_supplier = $record["desc_fourn"];
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
|
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -52,6 +53,7 @@ $socid=GETPOST('socid', 'int');
|
|||||||
$cost_price=GETPOST('cost_price', 'alpha');
|
$cost_price=GETPOST('cost_price', 'alpha');
|
||||||
$backtopage=GETPOST('backtopage', 'alpha');
|
$backtopage=GETPOST('backtopage', 'alpha');
|
||||||
$error=0;
|
$error=0;
|
||||||
|
$canmodifyotherentityfournprice = 1 ;
|
||||||
|
|
||||||
// If socid provided by ajax company selector
|
// If socid provided by ajax company selector
|
||||||
if (! empty($_REQUEST['search_fourn_id']))
|
if (! empty($_REQUEST['search_fourn_id']))
|
||||||
@ -933,7 +935,8 @@ SCRIPT;
|
|||||||
|
|
||||||
// Modify-Remove
|
// Modify-Remove
|
||||||
print '<td class="center nowraponall">';
|
print '<td class="center nowraponall">';
|
||||||
if ($usercancreate)
|
|
||||||
|
if ($usercancreate && $canmodifyotherentityfournprice == 1)
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$productfourn->fourn_id.'&action=add_price&rowid='.$productfourn->product_fourn_price_id.'">'.img_edit()."</a>";
|
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$productfourn->fourn_id.'&action=add_price&rowid='.$productfourn->product_fourn_price_id.'">'.img_edit()."</a>";
|
||||||
print ' ';
|
print ' ';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user