Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0

This commit is contained in:
Laurent Destailleur 2022-09-09 18:11:06 +02:00
commit 6f77359617
4 changed files with 16 additions and 3 deletions

View File

@ -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)
{ {

View File

@ -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");

View File

@ -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;

View File

@ -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);