Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0
This commit is contained in:
commit
3987fc6289
7 changed files with 15 additions and 13 deletions
|
|
@ -666,7 +666,7 @@ class Propal extends CommonObject
|
|||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
|
||||
if ($price_base_type == 'HT') {
|
||||
$pu = $pu_ht;
|
||||
} else {
|
||||
|
|
@ -894,7 +894,7 @@ class Propal extends CommonObject
|
|||
}
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
$pa_ht = price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
|
||||
if (empty($qty) && empty($special_code)) {
|
||||
$special_code = 3; // Set option tag
|
||||
}
|
||||
|
|
|
|||
|
|
@ -457,6 +457,7 @@ class PropaleLigne extends CommonObjectLine
|
|||
dol_syslog(get_class($this)."::insert rang=".$this->rang);
|
||||
|
||||
$pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'.
|
||||
$this->pa_ht = (float) $this->pa_ht; // convert to float after check if empty value
|
||||
|
||||
// Clean parameters
|
||||
if (empty($this->tva_tx)) {
|
||||
|
|
@ -501,9 +502,6 @@ class PropaleLigne extends CommonObjectLine
|
|||
if (!is_numeric($this->qty)) {
|
||||
$this->qty = 0;
|
||||
}
|
||||
if (empty($this->pa_ht)) {
|
||||
$this->pa_ht = 0;
|
||||
}
|
||||
if (empty($this->multicurrency_subprice)) {
|
||||
$this->multicurrency_subprice = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3176,7 +3176,7 @@ class Commande extends CommonOrder
|
|||
$remise_percent = (float) price2num($remise_percent);
|
||||
$qty = (float) price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pa_ht = (float) price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
|
|
|
|||
|
|
@ -3946,11 +3946,13 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
$remise_percent = (float) price2num($remise_percent);
|
||||
|
||||
$qty = (float) price2num($qty);
|
||||
$pu_ht = (float) price2num($pu_ht);
|
||||
$pu_ht_devise = (float) price2num($pu_ht_devise);
|
||||
$pu_ttc = (float) price2num($pu_ttc);
|
||||
$pa_ht = (float) price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
|
||||
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
|
|
@ -4208,10 +4210,12 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
$remise_percent = (float) price2num($remise_percent);
|
||||
|
||||
$qty = (float) price2num($qty);
|
||||
$pu = (float) price2num($pu);
|
||||
$pu_ht_devise = (float) price2num($pu_ht_devise);
|
||||
$pa_ht = (float) price2num($pa_ht);
|
||||
$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
|
||||
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,6 +302,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||
$error = 0;
|
||||
|
||||
$pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'.
|
||||
$this->pa_ht = (float) $this->pa_ht; // convert to float but after checking if value is empty
|
||||
|
||||
dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG);
|
||||
|
||||
|
|
@ -356,9 +357,6 @@ class FactureLigne extends CommonInvoiceLine
|
|||
$this->situation_percent = 100;
|
||||
}
|
||||
|
||||
if (empty($this->pa_ht)) {
|
||||
$this->pa_ht = 0;
|
||||
}
|
||||
if (empty($this->multicurrency_subprice)) {
|
||||
$this->multicurrency_subprice = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,7 +293,9 @@ class Inventory extends CommonObject
|
|||
if (!empty($include_sub_warehouse) && getDolGlobalInt('INVENTORY_INCLUDE_SUB_WAREHOUSE')) {
|
||||
$TChildWarehouses = array();
|
||||
$this->getChildWarehouse($this->fk_warehouse, $TChildWarehouses);
|
||||
$sql .= " OR ps.fk_entrepot IN (".$this->db->sanitize(implode(',', $TChildWarehouses)).")";
|
||||
if (!empty($TChildWarehouses)) {
|
||||
$sql .= " OR ps.fk_entrepot IN (" . $this->db->sanitize(implode(',', $TChildWarehouses)) . ")";
|
||||
}
|
||||
}
|
||||
$sql .= ')';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3327,7 +3327,7 @@ if (!GETPOST('hide_websitemenu')) {
|
|||
print '<span class="valignmiddle disabled opacitymedium">'.img_picto($langs->trans($text_off), 'switch_on').'</span>';
|
||||
}
|
||||
} else {
|
||||
print ajax_object_onoff($websitepage, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle inline-block'.(empty($websitepage->id) ? ' opacitymedium disabled' : ''), 'statuswebsitepage', 1, 'pageid='.$websitepage->id);
|
||||
print ajax_object_onoff($websitepage, 'status', 'status', 'Online', 'Offline', array(), 'valignmiddle inline-block'.(empty($websitepage->id) ? ' opacitymedium disabled' : ''), 'statuswebsitepage', 1, 'website='.urlencode($website->ref).'&pageid='.((int) $websitepage->id));
|
||||
}
|
||||
//print '</div>';
|
||||
print '</span>';
|
||||
|
|
|
|||
Loading…
Reference in a new issue