mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-02 07:02:29 +01:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a09c7cfd9 | ||
|
|
ebd018a476 | ||
|
|
a18a544ca2 | ||
|
|
f5aff05704 | ||
|
|
e7a6f779de | ||
|
|
f6ca154c4a | ||
|
|
670dde1074 | ||
|
|
aacf34b3b5 | ||
|
|
32ed90740c | ||
|
|
b474c07d48 | ||
|
|
a5d95ae8e6 | ||
|
|
99b685ce2a | ||
|
|
0953156549 | ||
|
|
a009bf4ef7 | ||
|
|
60c98ddc30 |
@@ -547,7 +547,7 @@ class BlockedLog
|
||||
}
|
||||
}
|
||||
|
||||
// ref
|
||||
// ref object
|
||||
$this->ref_object = ((!empty($object->newref)) ? $object->newref : $object->ref); // newref is set when validating a draft, ref is set in other cases
|
||||
// type of object
|
||||
$this->element = $object->element;
|
||||
@@ -595,7 +595,13 @@ class BlockedLog
|
||||
'fk_incoterms', 'label_incoterms', 'location_incoterms', 'lines'));
|
||||
}
|
||||
|
||||
if (!empty($object->thirdparty)) {
|
||||
// For customer payment and supplier payment, the thirdparty can be added in payment detail
|
||||
$addthirdpartyatpaymentlevel = 0;
|
||||
if (!empty($object->thirdparty) && !in_array($this->element, array('payment', 'payment_supplier'))) {
|
||||
$addthirdpartyatpaymentlevel = 1;
|
||||
}
|
||||
|
||||
if (!empty($object->thirdparty) && !$addthirdpartyatpaymentlevel) {
|
||||
$this->object_data->thirdparty = new stdClass();
|
||||
|
||||
foreach ($object->thirdparty as $key => $value) {
|
||||
@@ -652,7 +658,7 @@ class BlockedLog
|
||||
$valuequalifiedforstorage = true; // We accept '' value for some fields
|
||||
$value = (string) $value;
|
||||
}
|
||||
if (!is_null($value) && empty($value) && in_array($key, array('tva_assuj'))) {
|
||||
if (!is_null($value) && empty($value) && in_array($key, array('tva_assuj', 'localtax1_assuj', 'localtax2_assuj'))) {
|
||||
$valuequalifiedforstorage = true; // We accept zero value for amounts
|
||||
}
|
||||
if (!is_null($value) && (string) $value !== '') {
|
||||
@@ -753,6 +759,33 @@ class BlockedLog
|
||||
if (!empty($object->newref)) {
|
||||
$this->object_data->ref = $object->newref;
|
||||
}
|
||||
|
||||
// Add data for action emails
|
||||
if ($action == 'BILL_SENTBYMAIL') {
|
||||
$emailobj = new stdClass();
|
||||
$emailobj->email_from = $object->email_from;
|
||||
//$emailobj->email_to = $object->email_to;
|
||||
$emailobj->email_msgid = $object->email_msgid;
|
||||
$emailobj->email_subject = $object->email_subject;
|
||||
|
||||
$this->object_data->action_email_sent = $emailobj;
|
||||
}
|
||||
|
||||
// Add data for action doc_preview
|
||||
if ($action == 'DOC_PREVIEW') {
|
||||
$docpreviewobj = new stdClass();
|
||||
$docpreviewobj->pos_print_counter = $object->pos_print_counter;
|
||||
|
||||
//$this->object_data->action_doc_preview = $docpreviewobj;
|
||||
}
|
||||
|
||||
// Add data for action doc_download
|
||||
if ($action == 'DOC_DOWNLOAD') {
|
||||
$docdownloadobj = new stdClass();
|
||||
$docdownloadobj->pos_print_counter = $object->pos_print_counter;
|
||||
|
||||
//$this->object_data->action_doc_download = $docdownloadobj;
|
||||
}
|
||||
} elseif ($this->element == 'invoice_supplier') {
|
||||
'@phan-var-force FactureFournisseur $object';
|
||||
foreach ($object as $key => $value) {
|
||||
@@ -849,7 +882,9 @@ class BlockedLog
|
||||
$paymentpart = new stdClass();
|
||||
$paymentpart->amount = $amount;
|
||||
|
||||
if (!in_array($this->element, array('payment_donation', 'payment_various'))) {
|
||||
// If we want to add thirdparty on each payment level
|
||||
// (seems not necessary as we have one thirdparty per payment on invoice level)
|
||||
if ($addthirdpartyatpaymentlevel) {
|
||||
$result = $tmpobject->fetch_thirdparty();
|
||||
if ($result == 0) {
|
||||
$this->error = 'Failed to fetch thirdparty for object with id '.$tmpobject->id;
|
||||
@@ -870,7 +905,7 @@ class BlockedLog
|
||||
// List of thirdparty fields qualified
|
||||
if (!in_array($key, array(
|
||||
'name', 'name_alias', 'ref_ext', 'address', 'zip', 'town', 'state_code', 'country_code', 'idprof1', 'idprof2', 'idprof3', 'idprof4', 'idprof5', 'idprof6', 'phone', 'fax', 'email', 'barcode',
|
||||
'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur'
|
||||
'tva_intra', 'tva_assuj', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur'
|
||||
))) {
|
||||
continue; // Discard if not into a dedicated list
|
||||
}
|
||||
|
||||
@@ -2232,7 +2232,7 @@ class Facture extends CommonInvoice
|
||||
$sql .= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
||||
$sql .= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc';
|
||||
$sql .= ', f.fk_incoterms, f.location_incoterms';
|
||||
$sql .= ', f.module_source, f.pos_source, f.pos_print_counter';
|
||||
$sql .= ', f.module_source, f.pos_source, f.pos_print_counter, f.email_sent_counter';
|
||||
$sql .= ", i.libelle as label_incoterms";
|
||||
$sql .= ", f.retained_warranty as retained_warranty, f.retained_warranty_date_limit as retained_warranty_date_limit, f.retained_warranty_fk_cond_reglement as retained_warranty_fk_cond_reglement";
|
||||
$sql .= ", f.payment_reference, f.dispute_status";
|
||||
@@ -2361,6 +2361,7 @@ class Facture extends CommonInvoice
|
||||
$this->module_source = $obj->module_source;
|
||||
$this->pos_source = $obj->pos_source;
|
||||
$this->pos_print_counter = $obj->pos_print_counter;
|
||||
$this->email_sent_counter = $obj->email_sent_counter;
|
||||
|
||||
// Multicurrency
|
||||
$this->fk_multicurrency = $obj->fk_multicurrency;
|
||||
|
||||
@@ -457,7 +457,11 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
|
||||
// If sending email for invoice, we increase the counter of invoices sent by email
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture SET email_sent_counter = email_sent_counter + 1";
|
||||
$sql .= " WHERE rowid = ".((int) $object->id);
|
||||
$db->query($sql);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$object->email_sent_counter += 1;
|
||||
}
|
||||
}
|
||||
|
||||
$result = $object->call_trigger($triggersendname, $user); // @phan-suppress-current-line PhanPossiblyUndeclaredGlobalVariable
|
||||
|
||||
@@ -96,8 +96,8 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
|
||||
|| $action === 'MEMBER_SUBSCRIPTION_CREATE' || $action === 'MEMBER_SUBSCRIPTION_MODIFY' || $action === 'MEMBER_SUBSCRIPTION_DELETE'
|
||||
|| $action === 'DON_VALIDATE' || (($action === 'DON_MODIFY' || $action === 'DON_DELETE') && ($object->statut != 0 || $object->status != 0))
|
||||
|| $action === 'CASHCONTROL_VALIDATE'
|
||||
|| (in_array($object->element, array('facture', 'supplier_invoice')) && $action === 'DOC_DOWNLOAD' && ($object->statut != 0 || $object->status != 0))
|
||||
|| (in_array($object->element, array('facture', 'supplier_invoice')) && $action === 'DOC_PREVIEW' && ($object->statut != 0 || $object->status != 0))
|
||||
|| (in_array($object->element, array('facture', 'supplier_invoice')) && $action === 'DOC_PREVIEW' && ($object->statut != 0 || $object->status != 0 || $object->module_source != ''))
|
||||
|| (in_array($object->element, array('facture', 'supplier_invoice')) && $action === 'DOC_DOWNLOAD' && ($object->statut != 0 || $object->status != 0 || $object->module_source != ''))
|
||||
|| (getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED') && in_array($action, explode(',', getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED'))))
|
||||
) {
|
||||
$qualified++;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
|
||||
define('DOL_MINOR_VERSION', '0.0');
|
||||
define('DOL_MINOR_VERSION', '0.0-alpha');
|
||||
|
||||
if (!defined('DOL_APPLICATION_TITLE')) {
|
||||
define('DOL_APPLICATION_TITLE', 'Dolibarr');
|
||||
|
||||
@@ -37,7 +37,7 @@ if (!defined('DOL_APPLICATION_TITLE')) {
|
||||
}
|
||||
|
||||
// The major version of Dolibarr
|
||||
define('DOL_MAJOR_VERSION', '23');
|
||||
define('DOL_MAJOR_VERSION', '24');
|
||||
|
||||
define('DOL_VERSION', constant('DOL_MAJOR_VERSION').'.'.constant('DOL_MINOR_VERSION'));
|
||||
// DOL_VERSION is now a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
||||
|
||||
Reference in New Issue
Block a user