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

This commit is contained in:
Laurent Destailleur 2023-10-20 13:08:51 +02:00
commit ba04ba4f0e
5 changed files with 40 additions and 4 deletions

View file

@ -373,7 +373,7 @@ class DiscountAbsolute
if ($this->fk_facture_source) {
$sql = "UPDATE ".$this->db->prefix()."facture";
$sql .= " set paye=0, fk_statut=1";
$sql .= " WHERE (type IN (".$this->db->sanitize(CommonInvoice::TYPE_CREDIT_NOTE.", ".CommonInvoice::TYPE_DEPOSIT).") AND rowid = ".((int) $this->fk_facture_source);
$sql .= " WHERE type IN (".$this->db->sanitize(CommonInvoice::TYPE_CREDIT_NOTE.", ".CommonInvoice::TYPE_DEPOSIT).") AND rowid = ".((int) $this->fk_facture_source);
dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut", LOG_DEBUG);
$result = $this->db->query($sql);
@ -388,7 +388,7 @@ class DiscountAbsolute
} elseif ($this->fk_invoice_supplier_source) {
$sql = "UPDATE ".$this->db->prefix()."facture_fourn";
$sql .= " set paye=0, fk_statut=1";
$sql .= " WHERE (type IN (".$this->db->sanitize(CommonInvoice::TYPE_CREDIT_NOTE.", ".CommonInvoice::TYPE_DEPOSIT).") AND rowid = ".((int) $this->fk_invoice_supplier_source);
$sql .= " WHERE type IN (".$this->db->sanitize(CommonInvoice::TYPE_CREDIT_NOTE.", ".CommonInvoice::TYPE_DEPOSIT).") AND rowid = ".((int) $this->fk_invoice_supplier_source);
dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut", LOG_DEBUG);
$result = $this->db->query($sql);

View file

@ -6,6 +6,7 @@
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
*
* 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
@ -584,6 +585,24 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
$object->sendtoid = 0;
} elseif ($action == 'FICHINTER_CLOSE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "interventions"));
if (empty($object->actionmsg2)) {
if (empty($object->context['actionmsg2'])) {
$object->actionmsg2 = $langs->transnoentities("InterventionClosedInDolibarr", $object->ref);
} else {
$object->actionmsg2 = $object->context['actionmsg2'];
}
}
if (empty($object->actionmsg)) {
$object->actionmsg = $langs->transnoentities("InterventionClosedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->fk_element = 0;
$object->elementtype = '';
} elseif ($action == 'FICHINTER_DELETE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "interventions"));

View file

@ -910,7 +910,7 @@ class PaiementFourn extends Paiement
if (!empty($billsarray)) {
$supplier_invoice = new FactureFournisseur($this->db);
if ($supplier_invoice->fetch($billsarray[0]) > 0) {
$force_thirdparty_id = $supplier_invoice->fk_soc;
$force_thirdparty_id = $supplier_invoice->socid;
}
}
}

View file

@ -38,6 +38,7 @@ InterventionModifiedInDolibarr=Intervention %s modified
InterventionClassifiedBilledInDolibarr=Intervention %s set as billed
InterventionClassifiedUnbilledInDolibarr=Intervention %s set as unbilled
InterventionSentByEMail=Intervention %s sent by email
InterventionClosedInDolibarr= Intervention %s closed
InterventionDeletedInDolibarr=Intervention %s deleted
InterventionsArea=Interventions area
DraftFichinter=Draft interventions

View file

@ -224,6 +224,7 @@ $arrayfields = array(
'p.ref'=>array('label'=>'ProductRef', 'checked'=>1, 'position'=>10),
//'pfp.ref_fourn'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1, 'enabled'=>(isModEnabled('barcode'))),
'thumbnail'=>array('label'=>'Photo', 'checked'=>0, 'position'=>10),
'p.description'=>array('label'=>'Description', 'checked'=>0, 'position'=>10),
'p.label'=>array('label'=>"Label", 'checked'=>1, 'position'=>10),
'p.fk_product_type'=>array('label'=>"Type", 'checked'=>0, 'enabled'=>(isModEnabled("product") && isModEnabled("service")), 'position'=>11),
'p.barcode'=>array('label'=>"Gencod", 'checked'=>1, 'enabled'=>(isModEnabled('barcode')), 'position'=>12),
@ -992,6 +993,11 @@ if (!empty($arrayfields['p.fk_product_type']['checked'])) {
print $form->selectarray('search_type', $array, $search_type);
print '</td>';
}
// Description
if (!empty($arrayfields['p.description']['checked'])) {
print '<td class="liste_titre left">';
print '</td>';
}
// Barcode
if (!empty($arrayfields['p.barcode']['checked'])) {
print '<td class="liste_titre">';
@ -1718,7 +1724,17 @@ while ($i < $imaxinloop) {
$totalarray['nbfield']++;
}
}
// Description
if (!empty($arrayfields['p.description']['checked'])) {
print '<td class="left">';
// Since description can be very large (several pages of HTML-
// code) we limit to the first two rows
print dolGetFirstLineofText($product_static->description, 2);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Weight
if (!empty($arrayfields['p.weight']['checked'])) {
print '<td class="center">';