Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
6f77359617
@ -5305,7 +5305,7 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $rounding Minimum number of decimal to show. If 0, no change, if -1, we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT)
|
* @param int $rounding Minimum number of decimal to show. If 0, no change, if -1, we use min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT)
|
||||||
* @return number or -1 if not available
|
* @return float or -1 if not available
|
||||||
*/
|
*/
|
||||||
public function getRetainedWarrantyAmount($rounding = -1)
|
public function getRetainedWarrantyAmount($rounding = -1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -59,7 +59,7 @@ function product_prepare_head($object)
|
|||||||
|
|
||||||
if (!empty($object->status_buy) || (!empty($conf->margin->enabled) && !empty($object->status))) { // If margin is on and product on sell, we may need the cost price even if product os not on purchase
|
if (!empty($object->status_buy) || (!empty($conf->margin->enabled) && !empty($object->status))) { // If margin is on and product on sell, we may need the cost price even if product os not on purchase
|
||||||
if ((((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->lire)
|
if ((((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->lire)
|
||||||
|| (!empty($conf->margin->enabled) && $user->rights->margin->liretous)
|
|| (!empty($conf->margin->enabled) && $user->rights->margins->liretous)
|
||||||
) {
|
) {
|
||||||
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$object->id;
|
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$object->id;
|
||||||
$head[$h][1] = $langs->trans("BuyingPrices");
|
$head[$h][1] = $langs->trans("BuyingPrices");
|
||||||
|
|||||||
@ -2947,7 +2947,7 @@ class SupplierProposalLine extends CommonObjectLine
|
|||||||
$this->product_label = $objp->product_label;
|
$this->product_label = $objp->product_label;
|
||||||
$this->product_desc = $objp->product_desc;
|
$this->product_desc = $objp->product_desc;
|
||||||
|
|
||||||
$this->ref_fourn = $objp->ref_produit_forun;
|
$this->ref_fourn = $objp->ref_produit_fourn;
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
$this->fk_multicurrency = $objp->fk_multicurrency;
|
$this->fk_multicurrency = $objp->fk_multicurrency;
|
||||||
|
|||||||
@ -1034,6 +1034,19 @@ class Ticket extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete all child tables
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_ticket";
|
||||||
|
$sql .= " WHERE fk_ticket = ".(int) $this->id;
|
||||||
|
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
if (!$result) {
|
||||||
|
$error++;
|
||||||
|
$this->errors[] = $this->db->lasterror();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."ticket";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."ticket";
|
||||||
$sql .= " WHERE rowid=".((int) $this->id);
|
$sql .= " WHERE rowid=".((int) $this->id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user