Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts: htdocs/comm/propal/class/propal.class.php htdocs/core/class/html.form.class.php
This commit is contained in:
commit
4c2af6fc70
@ -179,24 +179,30 @@ else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
// TODO We add/delete permission here until permission can have a condition on a global var
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
|
||||
$newmodule=new modFournisseur($db);
|
||||
// clear default rights array
|
||||
$newmodule->rights=array();
|
||||
// add new right
|
||||
$r=0;
|
||||
$newmodule->rights[$r][0] = 1190;
|
||||
$newmodule->rights[$r][1] = $langs->trans("Permission1190");
|
||||
$newmodule->rights[$r][2] = 'w';
|
||||
$newmodule->rights[$r][3] = 0;
|
||||
$newmodule->rights[$r][4] = 'commande';
|
||||
$newmodule->rights[$r][5] = 'approve2';
|
||||
|
||||
|
||||
if ($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)
|
||||
{
|
||||
// clear default rights array
|
||||
$newmodule->rights=array();
|
||||
// add new right
|
||||
$r=0;
|
||||
$newmodule->rights[$r][0] = 1190;
|
||||
$newmodule->rights[$r][1] = $langs->trans("Permission1190");
|
||||
$newmodule->rights[$r][2] = 'w';
|
||||
$newmodule->rights[$r][3] = 0;
|
||||
$newmodule->rights[$r][4] = 'commande';
|
||||
$newmodule->rights[$r][5] = 'approve2';
|
||||
|
||||
// Insert
|
||||
$newmodule->insert_permissions(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove all rights with Permission1190
|
||||
$newmodule->delete_permissions();
|
||||
|
||||
// Add all right without Permission1190
|
||||
$newmodule->insert_permissions(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -426,6 +426,7 @@ class Propal extends CommonObject
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$txtva=price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
@ -647,6 +648,7 @@ class Propal extends CommonObject
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$txtva = price2num($txtva);
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
|
||||
@ -1282,6 +1282,7 @@ class Commande extends CommonOrder
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
$txtva = price2num($txtva);
|
||||
@ -2870,6 +2871,7 @@ class Commande extends CommonOrder
|
||||
$qty=price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$txtva=price2num($txtva);
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
|
||||
@ -408,7 +408,7 @@ if (empty($reshook))
|
||||
|
||||
//var_dump($object->getRemainToPay(0));
|
||||
//var_dump($discount->amount_ttc);exit;
|
||||
if ($discount->amount_ttc > $object->getRemainToPay(0))
|
||||
if (price2num($discount->amount_ttc) > price2num($object->getRemainToPay(0)))
|
||||
{
|
||||
// TODO Split the discount in 2 automatically
|
||||
$error++;
|
||||
|
||||
@ -2606,6 +2606,7 @@ class Facture extends CommonInvoice
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$pa_ht=price2num($pa_ht);
|
||||
$txtva=price2num($txtva);
|
||||
@ -2829,6 +2830,7 @@ class Facture extends CommonInvoice
|
||||
$remise_percent = price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$txtva = price2num($txtva);
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
|
||||
@ -2630,7 +2630,7 @@ class Form
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('productprice').")";
|
||||
$sql.= " WHERE pfp.entity IN (".getEntity('productprice').")";
|
||||
$sql.= " AND p.tobuy = 1";
|
||||
$sql.= " AND s.fournisseur = 1";
|
||||
$sql.= " AND p.rowid = ".$productid;
|
||||
|
||||
@ -1437,6 +1437,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu_ht=price2num($pu_ht);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$pu_ttc=price2num($pu_ttc);
|
||||
$txtva = price2num($txtva);
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
@ -2391,6 +2392,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$qty=price2num($qty);
|
||||
if (! $qty) $qty=1;
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise=price2num($pu_ht_devise);
|
||||
$txtva=price2num($txtva);
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user