mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Compare commits
2 Commits
e2595b5117
...
7847408006
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7847408006 | ||
|
|
a4114d61be |
Binary file not shown.
@@ -747,25 +747,9 @@ class Asset extends CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Old request with 'WITH'
|
$sql = "SELECT ad.rowid, ad.depreciation_mode, ad.ref, ad.depreciation_date, ad.depreciation_ht, ad.cumulative_depreciation_ht,";
|
||||||
/*
|
$sql .= " " . $this->db->ifsql('EXISTS (SELECT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type = \'asset\' AND ab.fk_docdet = ad.rowid)', '1', '0') . " AS bookkeeping";
|
||||||
$sql = "WITH in_accounting_bookkeeping(fk_docdet) AS (";
|
|
||||||
$sql .= " SELECT DISTINCT fk_docdet";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping";
|
|
||||||
$sql .= " WHERE doc_type = 'asset'";
|
|
||||||
$sql .= ")";
|
|
||||||
$sql .= "SELECT ad.rowid, ad.depreciation_mode, ad.ref, ad.depreciation_date, ad.depreciation_ht, ad.cumulative_depreciation_ht";
|
|
||||||
$sql .= ", " . $this->db->ifsql('iab.fk_docdet IS NOT NULL', 1, 0) . " AS bookkeeping";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation AS ad";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation AS ad";
|
||||||
$sql .= " LEFT JOIN in_accounting_bookkeeping as iab ON iab.fk_docdet = ad.rowid";
|
|
||||||
$sql .= " WHERE ad.fk_asset = " . (int) $this->id;
|
|
||||||
$sql .= " ORDER BY ad.depreciation_date ASC";
|
|
||||||
*/
|
|
||||||
|
|
||||||
$sql = "SELECT ad.rowid, ad.depreciation_mode, ad.ref, ad.depreciation_date, ad.depreciation_ht, ad.cumulative_depreciation_ht";
|
|
||||||
$sql .= ", " . $this->db->ifsql('iab.fk_docdet IS NOT NULL', '1', '0') . " AS bookkeeping";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "asset_depreciation AS ad";
|
|
||||||
$sql .= " LEFT JOIN (SELECT DISTINCT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE doc_type = 'asset') AS iab ON iab.fk_docdet = ad.rowid";
|
|
||||||
$sql .= " WHERE ad.fk_asset = " . (int) $this->id;
|
$sql .= " WHERE ad.fk_asset = " . (int) $this->id;
|
||||||
$sql .= " ORDER BY ad.depreciation_date ASC";
|
$sql .= " ORDER BY ad.depreciation_date ASC";
|
||||||
|
|
||||||
|
|||||||
@@ -129,6 +129,8 @@ function formatObject($objtoshow, $prefix)
|
|||||||
'pos_source' => "POSTerminal",
|
'pos_source' => "POSTerminal",
|
||||||
'posmodule' => 'POSModule',
|
'posmodule' => 'POSModule',
|
||||||
'posnumber' => 'POSTerminal',
|
'posnumber' => 'POSTerminal',
|
||||||
|
'pos_print_counter' => "NumberOfPrints",
|
||||||
|
'email_sent_counter' => "NumberOfEmailsSent",
|
||||||
'managers' => 'Managers',
|
'managers' => 'Managers',
|
||||||
'type_code' => 'PaymentMode',
|
'type_code' => 'PaymentMode',
|
||||||
'datec' => 'DateCreation',
|
'datec' => 'DateCreation',
|
||||||
@@ -153,11 +155,13 @@ function formatObject($objtoshow, $prefix)
|
|||||||
'tva_tx' => 'VatRate',
|
'tva_tx' => 'VatRate',
|
||||||
'localtax1_tx' => 'Localtax1Rate',
|
'localtax1_tx' => 'Localtax1Rate',
|
||||||
'localtax2_tx' => 'Localtax2Rate',
|
'localtax2_tx' => 'Localtax2Rate',
|
||||||
|
'vat_src_code' => 'VatCode',
|
||||||
'multicurrency_code' => 'Currency',
|
'multicurrency_code' => 'Currency',
|
||||||
'qty' => 'Quantity',
|
'qty' => 'Quantity',
|
||||||
'nom' => 'Name',
|
'nom' => 'Name',
|
||||||
'name' => 'Name',
|
'name' => 'Name',
|
||||||
'email' => 'Email',
|
'email' => 'Email',
|
||||||
|
'state_code' => 'State',
|
||||||
'revenuestamp' => 'RevenueStamp',
|
'revenuestamp' => 'RevenueStamp',
|
||||||
'code_client' => 'CustomerCode',
|
'code_client' => 'CustomerCode',
|
||||||
'capital' => 'Capital',
|
'capital' => 'Capital',
|
||||||
@@ -167,9 +171,10 @@ function formatObject($objtoshow, $prefix)
|
|||||||
'localtax2_value' => 'LocalTax2DefaultValue',
|
'localtax2_value' => 'LocalTax2DefaultValue',
|
||||||
'subprice' => 'UnitPrice',
|
'subprice' => 'UnitPrice',
|
||||||
'product_type' => 'ProductType',
|
'product_type' => 'ProductType',
|
||||||
|
'product_label' => 'ProductLabel',
|
||||||
'type' => 'InvoiceType',
|
'type' => 'InvoiceType',
|
||||||
'info_bits' => 'TVA NPR or NOT',
|
'info_bits' => 'TVA NPR or NOT',
|
||||||
'special_code' => 'Special line (WEEE line, option, id of module...)'
|
'special_code' => 'Special line (WEEE line, option, id of module...)',
|
||||||
);
|
);
|
||||||
|
|
||||||
if (is_object($newobjtoshow) || is_array($newobjtoshow)) {
|
if (is_object($newobjtoshow) || is_array($newobjtoshow)) {
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ class BlockedLog
|
|||||||
|
|
||||||
$sep = 0;
|
$sep = 0;
|
||||||
|
|
||||||
// Customer Invoice/Facture / Payment
|
// Customer Invoice/Facture / Payment (For most VAT antifraud laws)
|
||||||
if (isModEnabled('invoice')) {
|
if (isModEnabled('invoice')) {
|
||||||
$sep++;
|
$sep++;
|
||||||
$this->trackedevents['separator_'.$sep] = array('id' => 'separator_'.$sep, 'label' => '----------', 'labelhtml' => '<span class="opacitymedium">----- '.$langs->trans("Invoices").' | '.$langs->trans("Payments").'</span>', 'disabled' => 1);
|
$this->trackedevents['separator_'.$sep] = array('id' => 'separator_'.$sep, 'label' => '----------', 'labelhtml' => '<span class="opacitymedium">----- '.$langs->trans("Invoices").' | '.$langs->trans("Payments").'</span>', 'disabled' => 1);
|
||||||
@@ -221,7 +221,7 @@ class BlockedLog
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Donation
|
// Donation
|
||||||
if (isModEnabled('don')) {
|
if (isModEnabled('don') && getDolGlobalString('BLOCKEDLOG_ENABLE_DONATION')) { // For countries that need unalterable logs for donations
|
||||||
if (!empty($this->trackedevents)) {
|
if (!empty($this->trackedevents)) {
|
||||||
$sep++;
|
$sep++;
|
||||||
$this->trackedevents['separator_'.$sep] = array('id' => 'separator_'.$sep, 'label' => '----------', 'labelhtml' => '<span class="opacitymedium">----- '.$langs->trans("Donations").' | '.$langs->trans("Payments").'</span>', 'disabled' => 1);
|
$this->trackedevents['separator_'.$sep] = array('id' => 'separator_'.$sep, 'label' => '----------', 'labelhtml' => '<span class="opacitymedium">----- '.$langs->trans("Donations").' | '.$langs->trans("Payments").'</span>', 'disabled' => 1);
|
||||||
@@ -244,7 +244,7 @@ class BlockedLog
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Members
|
// Members
|
||||||
if (isModEnabled('member')) {
|
if (isModEnabled('member') && getDolGlobalString('BLOCKEDLOG_ENABLE_MEMBER')) { // For countries that need unalterable logs for membership management
|
||||||
if (!empty($this->trackedevents)) {
|
if (!empty($this->trackedevents)) {
|
||||||
$sep++;
|
$sep++;
|
||||||
$this->trackedevents['separator_'.$sep] = array('id' => 'separator_'.$sep, 'label' => '----------', 'labelhtml' => '<span class="opacitymedium">----- '.$langs->trans("MenuMembers").'</span>', 'disabled' => 1);
|
$this->trackedevents['separator_'.$sep] = array('id' => 'separator_'.$sep, 'label' => '----------', 'labelhtml' => '<span class="opacitymedium">----- '.$langs->trans("MenuMembers").'</span>', 'disabled' => 1);
|
||||||
@@ -256,6 +256,7 @@ class BlockedLog
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bank
|
// Bank
|
||||||
|
/*
|
||||||
if (isModEnabled("bank")) {
|
if (isModEnabled("bank")) {
|
||||||
if (!empty($this->trackedevents)) {
|
if (!empty($this->trackedevents)) {
|
||||||
$sep++;
|
$sep++;
|
||||||
@@ -266,6 +267,7 @@ class BlockedLog
|
|||||||
$this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = array('id' => 'PAYMENT_VARIOUS_MODIFY', 'label' => 'logPAYMENT_VARIOUS_MODIFY', 'labelhtml' => img_picto('', 'bank', 'class="pictofixedwidth").').$langs->trans('logPAYMENT_VARIOUS_MODIFY'));
|
$this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = array('id' => 'PAYMENT_VARIOUS_MODIFY', 'label' => 'logPAYMENT_VARIOUS_MODIFY', 'labelhtml' => img_picto('', 'bank', 'class="pictofixedwidth").').$langs->trans('logPAYMENT_VARIOUS_MODIFY'));
|
||||||
$this->trackedevents['PAYMENT_VARIOUS_DELETE'] = array('id' => 'PAYMENT_VARIOUS_DELETE', 'label' => 'logPAYMENT_VARIOUS_DELETE', 'labelhtml' => img_picto('', 'bank', 'class="pictofixedwidth").').$langs->trans('logPAYMENT_VARIOUS_DELETE'));
|
$this->trackedevents['PAYMENT_VARIOUS_DELETE'] = array('id' => 'PAYMENT_VARIOUS_DELETE', 'label' => 'logPAYMENT_VARIOUS_DELETE', 'labelhtml' => img_picto('', 'bank', 'class="pictofixedwidth").').$langs->trans('logPAYMENT_VARIOUS_DELETE'));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Cash register closing
|
// Cash register closing
|
||||||
// $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all external POS modules
|
// $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all external POS modules
|
||||||
@@ -279,8 +281,8 @@ class BlockedLog
|
|||||||
$this->trackedevents['CASHCONTROL_VALIDATE'] = array('id' => 'CASHCONTROL_VALIDATE', 'label' => 'logCASHCONTROL_VALIDATE', 'labelhtml' => img_picto('', 'pos', 'class="pictofixedwidth").').$langs->trans('logCASHCONTROL_VALIDATE'));
|
$this->trackedevents['CASHCONTROL_VALIDATE'] = array('id' => 'CASHCONTROL_VALIDATE', 'label' => 'logCASHCONTROL_VALIDATE', 'labelhtml' => img_picto('', 'pos', 'class="pictofixedwidth").').$langs->trans('logCASHCONTROL_VALIDATE'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add more action to track from a conf variable
|
// Add more action to track from a conf variable. For the case we want to track other actions into the unalterable log.
|
||||||
// For example: STOCK_MOVEMENT,...
|
// For example: STOCK_MOVEMENT, ...
|
||||||
if (getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED')) {
|
if (getDolGlobalString('BLOCKEDLOG_ADD_ACTIONS_SUPPORTED')) {
|
||||||
if (!empty($this->trackedevents)) {
|
if (!empty($this->trackedevents)) {
|
||||||
$sep++;
|
$sep++;
|
||||||
@@ -515,7 +517,8 @@ class BlockedLog
|
|||||||
'table_element', 'fields',
|
'table_element', 'fields',
|
||||||
'ref_previous', 'ref_next',
|
'ref_previous', 'ref_next',
|
||||||
'origin', 'origin_id',
|
'origin', 'origin_id',
|
||||||
'oldcopy', 'picto', 'error', 'errors', 'model_pdf', 'modelpdf', 'last_main_doc', 'civility_id', 'contact', 'contact_id',
|
'oldcopy', 'picto', 'error', 'errors',
|
||||||
|
'model_pdf', 'modelpdf', 'last_main_doc', 'civility_id', 'contact', 'contact_id',
|
||||||
'table_element_line', 'ismultientitymanaged', 'isextrafieldmanaged',
|
'table_element_line', 'ismultientitymanaged', 'isextrafieldmanaged',
|
||||||
'array_languages',
|
'array_languages',
|
||||||
'childtables',
|
'childtables',
|
||||||
@@ -554,17 +557,32 @@ class BlockedLog
|
|||||||
// List of fields qualified
|
// List of fields qualified
|
||||||
if (!in_array($key, array(
|
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',
|
'name', 'name_alias', 'ref_ext', 'address', 'zip', 'town', 'state_code', 'country_code', 'idprof1', 'idprof2', 'idprof3', 'idprof4', 'idprof5', 'idprof6', 'phone', 'fax', 'email', 'barcode',
|
||||||
'tva_intra', 'tva_assuj', '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', 'localtax2_assuj', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur'
|
||||||
))) {
|
))) {
|
||||||
continue; // Discard if not into this dedicated list
|
continue; // Discard if not into this dedicated list
|
||||||
}
|
}
|
||||||
if (!is_object($value) && !is_null($value) && $value !== '') {
|
|
||||||
|
$valuequalifiedforstorage = false;
|
||||||
|
if (!is_object($value)) {
|
||||||
|
if (empty($value) && in_array($key, array('country_code', 'idprof1', 'idprof2', 'tva_intra'))) {
|
||||||
|
$valuequalifiedforstorage = true; // We accept '' value for some fields
|
||||||
|
$value = (string) $value;
|
||||||
|
}
|
||||||
|
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 !== '') {
|
||||||
|
$valuequalifiedforstorage = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($valuequalifiedforstorage) {
|
||||||
$this->object_data->thirdparty->$key = $value;
|
$this->object_data->thirdparty->$key = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add company info
|
// Add my company info
|
||||||
if (!empty($mysoc)) {
|
if (!empty($mysoc)) {
|
||||||
$this->object_data->mycompany = new stdClass();
|
$this->object_data->mycompany = new stdClass();
|
||||||
|
|
||||||
@@ -572,14 +590,29 @@ class BlockedLog
|
|||||||
if (in_array($key, $arrayoffieldstoexclude)) {
|
if (in_array($key, $arrayoffieldstoexclude)) {
|
||||||
continue; // Discard some properties
|
continue; // Discard some properties
|
||||||
}
|
}
|
||||||
// List of fields qualified
|
// List of fields qualified to keep
|
||||||
if (!in_array($key, array(
|
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',
|
'name', 'name_alias', 'ref_ext', 'address', 'zip', 'town', 'state_code', 'country_code', 'idprof1', 'idprof2', 'idprof3', 'idprof4', 'idprof5', 'idprof6', 'phone', 'fax', 'email', 'barcode',
|
||||||
'tva_assuj', 'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur'
|
'tva_assuj', 'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur'
|
||||||
))) {
|
))) {
|
||||||
continue; // Discard if not into this dedicated list
|
continue; // Discard if not into this dedicated list
|
||||||
}
|
}
|
||||||
if (!is_object($value) && !is_null($value) && $value !== '') {
|
|
||||||
|
$valuequalifiedforstorage = false;
|
||||||
|
if (!is_object($value)) {
|
||||||
|
if (empty($value) && in_array($key, array('country_code', 'idprof1', 'idprof2', 'tva_intra'))) {
|
||||||
|
$valuequalifiedforstorage = true; // We accept '' value for some fields
|
||||||
|
$value = (string) $value;
|
||||||
|
}
|
||||||
|
if (!is_null($value) && empty($value) && in_array($key, array('tva_assuj'))) {
|
||||||
|
$valuequalifiedforstorage = true; // We accept zero value for amounts
|
||||||
|
}
|
||||||
|
if (!is_null($value) && (string) $value !== '') {
|
||||||
|
$valuequalifiedforstorage = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($valuequalifiedforstorage) {
|
||||||
$this->object_data->mycompany->$key = $value;
|
$this->object_data->mycompany->$key = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -600,10 +633,14 @@ class BlockedLog
|
|||||||
}
|
}
|
||||||
// List of fields qualified
|
// List of fields qualified
|
||||||
if (!in_array($key, array(
|
if (!in_array($key, array(
|
||||||
'ref', 'ref_client', 'ref_supplier', 'date', 'datef', 'datev', 'type', 'total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'revenuestamp', 'datepointoftax', 'note_public', 'lines',
|
'ref', 'ref_client', 'ref_supplier', 'date', 'datef', 'datev', 'type',
|
||||||
'module_source', 'pos_source'
|
//'vat_src_code', 'tva_tx', 'localtax1_tx', 'localtax2_tx', There is no rate at full doc level
|
||||||
|
'total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2',
|
||||||
|
'revenuestamp', 'datepointoftax', 'note_public',
|
||||||
|
'lines',
|
||||||
|
'module_source', 'pos_source', 'pos_print_counter', 'email_sent_counter'
|
||||||
))) {
|
))) {
|
||||||
continue; // Discard if not into a dedicated list
|
continue; // Discarded if not into the dedicated list
|
||||||
}
|
}
|
||||||
if ($key == 'lines') {
|
if ($key == 'lines') {
|
||||||
$lineid = 0;
|
$lineid = 0;
|
||||||
@@ -612,8 +649,7 @@ class BlockedLog
|
|||||||
foreach ($tmpline as $keyline => $valueline) {
|
foreach ($tmpline as $keyline => $valueline) {
|
||||||
if (!in_array($keyline, array(
|
if (!in_array($keyline, array(
|
||||||
'ref', 'product_type', 'product_label',
|
'ref', 'product_type', 'product_label',
|
||||||
'qty',
|
'qty', 'subprice',
|
||||||
'subprice',
|
|
||||||
'vat_src_code', 'tva_tx', 'localtax1_tx', 'localtax2_tx',
|
'vat_src_code', 'tva_tx', 'localtax1_tx', 'localtax2_tx',
|
||||||
'total_ht', 'total_tva', 'total_ttc', 'total_localtax1', 'total_localtax2',
|
'total_ht', 'total_tva', 'total_ttc', 'total_localtax1', 'total_localtax2',
|
||||||
'multicurrency_code', 'multicurrency_total_ht', 'multicurrency_total_tva', 'multicurrency_total_ttc',
|
'multicurrency_code', 'multicurrency_total_ht', 'multicurrency_total_tva', 'multicurrency_total_ttc',
|
||||||
@@ -626,13 +662,43 @@ class BlockedLog
|
|||||||
$this->object_data->invoiceline[$lineid] = new stdClass();
|
$this->object_data->invoiceline[$lineid] = new stdClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_object($valueline) && !is_null($valueline) && $valueline !== '') {
|
$valuequalifiedforstorage = false;
|
||||||
|
if (!is_object($valueline)) {
|
||||||
|
if (!is_null($valueline) && empty($valueline) && in_array($key, array('tva_tx', 'localtax1_tx', 'localtax2_tx', 'total_ht', 'total_tva', 'total_ttc', 'total_localtax1', 'total_localtax2'))) {
|
||||||
|
$valuequalifiedforstorage = true; // We accept zero value for amounts
|
||||||
|
}
|
||||||
|
if (!is_null($valueline) && (string) $valueline !== '') {
|
||||||
|
$valuequalifiedforstorage = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($keyline == 'product_label' && empty($valueline)) {
|
||||||
|
$valueline = dol_trunc(dolGetFirstLineOfText($tmpline->desc)); // Fallback on description if label is empty
|
||||||
|
$valuequalifiedforstorage = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($valuequalifiedforstorage) {
|
||||||
$this->object_data->invoiceline[$lineid]->$keyline = $valueline;
|
$this->object_data->invoiceline[$lineid]->$keyline = $valueline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (!is_object($value) && !is_null($value) && $value !== '') {
|
} else {
|
||||||
$this->object_data->$key = $value;
|
$valuequalifiedforstorage = false;
|
||||||
|
if (!is_object($value)) {
|
||||||
|
if (empty($value) && in_array($key, array('pos_source', 'module_source'))) {
|
||||||
|
$valuequalifiedforstorage = true; // We accept '' value for some fields
|
||||||
|
$value = (string) $value;
|
||||||
|
}
|
||||||
|
if (!is_null($value) && empty($value) && in_array($key, array('total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'pos_print_counter', 'email_sent_counter'))) {
|
||||||
|
$valuequalifiedforstorage = true; // We accept zero value for amounts
|
||||||
|
}
|
||||||
|
if (!is_null($value) && (string) $value !== '') {
|
||||||
|
$valuequalifiedforstorage = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($valuequalifiedforstorage) {
|
||||||
|
$this->object_data->$key = $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -651,7 +717,22 @@ class BlockedLog
|
|||||||
))) {
|
))) {
|
||||||
continue; // Discard if not into a dedicated list
|
continue; // Discard if not into a dedicated list
|
||||||
}
|
}
|
||||||
if (!is_object($value) && !is_null($value) && $value !== '') {
|
|
||||||
|
$valuequalifiedforstorage = false;
|
||||||
|
if (!is_object($value)) {
|
||||||
|
if (empty($value) && in_array($key, array('pos_source', 'module_source'))) {
|
||||||
|
$valuequalifiedforstorage = true; // We accept '' value for some fields
|
||||||
|
$value = (string) $value;
|
||||||
|
}
|
||||||
|
if (!is_null($value) && empty($value) && in_array($key, array('total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'pos_print_counter', 'email_sent_counter'))) {
|
||||||
|
$valuequalifiedforstorage = true; // We accept zero value for amounts
|
||||||
|
}
|
||||||
|
if (!is_null($value) && (string) $value !== '') {
|
||||||
|
$valuequalifiedforstorage = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($valuequalifiedforstorage) {
|
||||||
$this->object_data->$key = $value;
|
$this->object_data->$key = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -679,7 +760,7 @@ class BlockedLog
|
|||||||
|
|
||||||
$totalamount = 0;
|
$totalamount = 0;
|
||||||
|
|
||||||
// Loop on each invoice payment amount (payment_part)
|
// Loop on each invoice payment amount (the payment_part)
|
||||||
if (is_array($object->amounts) && !empty($object->amounts)) {
|
if (is_array($object->amounts) && !empty($object->amounts)) {
|
||||||
$paymentpartnumber = 0;
|
$paymentpartnumber = 0;
|
||||||
foreach ($object->amounts as $objid => $amount) {
|
foreach ($object->amounts as $objid => $amount) {
|
||||||
@@ -738,7 +819,7 @@ class BlockedLog
|
|||||||
if (in_array($key, $arrayoffieldstoexclude)) {
|
if (in_array($key, $arrayoffieldstoexclude)) {
|
||||||
continue; // Discard some properties
|
continue; // Discard some properties
|
||||||
}
|
}
|
||||||
// List of fields qualified
|
// List of thirdparty fields qualified
|
||||||
if (!in_array($key, array(
|
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',
|
'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', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur'
|
||||||
@@ -754,6 +835,8 @@ class BlockedLog
|
|||||||
// Init object to avoid warnings
|
// Init object to avoid warnings
|
||||||
if ($this->element == 'payment_donation') {
|
if ($this->element == 'payment_donation') {
|
||||||
$paymentpart->donation = new stdClass();
|
$paymentpart->donation = new stdClass();
|
||||||
|
} elseif ($this->element == 'payment_various') {
|
||||||
|
$paymentpart->various = new stdClass();
|
||||||
} else {
|
} else {
|
||||||
$paymentpart->invoice = new stdClass();
|
$paymentpart->invoice = new stdClass();
|
||||||
}
|
}
|
||||||
@@ -765,11 +848,27 @@ class BlockedLog
|
|||||||
}
|
}
|
||||||
// List of fields qualified
|
// List of fields qualified
|
||||||
if (!in_array($key, array(
|
if (!in_array($key, array(
|
||||||
'ref', 'ref_client', 'ref_supplier', 'date', 'datef', 'type', 'total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'revenuestamp', 'datepointoftax', 'note_public'
|
'ref', 'ref_client', 'ref_supplier', 'date', 'datef', 'type', 'total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'revenuestamp', 'datepointoftax', 'note_public',
|
||||||
|
'pos_source', 'module_source', 'pos_print_counter', 'email_sent_counter'
|
||||||
))) {
|
))) {
|
||||||
continue; // Discard if not into a dedicated list
|
continue; // Discard if not into a dedicated list
|
||||||
}
|
}
|
||||||
if (!is_object($value) && !is_null($value) && $value !== '') {
|
|
||||||
|
$valuequalifiedforstorage = false;
|
||||||
|
if (!is_object($value)) {
|
||||||
|
if (empty($value) && in_array($key, array('pos_source', 'module_source'))) {
|
||||||
|
$valuequalifiedforstorage = true; // We accept '' value for some fields
|
||||||
|
$value = (string) $value;
|
||||||
|
}
|
||||||
|
if (!is_null($value) && empty($value) && in_array($key, array('total_ht', 'total_tva', 'total_ttc', 'localtax1', 'localtax2', 'pos_print_counter', 'email_sent_counter'))) {
|
||||||
|
$valuequalifiedforstorage = true; // We accept zero value for amounts
|
||||||
|
}
|
||||||
|
if (!is_null($value) && (string) $value !== '') {
|
||||||
|
$valuequalifiedforstorage = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($valuequalifiedforstorage) {
|
||||||
if ($this->element == 'payment_donation') {
|
if ($this->element == 'payment_donation') {
|
||||||
$paymentpart->donation->$key = $value;
|
$paymentpart->donation->$key = $value;
|
||||||
} elseif ($this->element == 'payment_various') {
|
} elseif ($this->element == 'payment_various') {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Fingerprints=Archived events and fingerprints
|
|||||||
FingerprintsDesc=This is the tool to browse or extract the unalterable logs. Unalterable logs are generated and store into a dedicated table of the systel, in real time when a business event appears.
|
FingerprintsDesc=This is the tool to browse or extract the unalterable logs. Unalterable logs are generated and store into a dedicated table of the systel, in real time when a business event appears.
|
||||||
ArchivesDesc=You can use this tool to export Unalterable Logs into archive files. They are kept into the system but you should download and copy them into external supports.
|
ArchivesDesc=You can use this tool to export Unalterable Logs into archive files. They are kept into the system but you should download and copy them into external supports.
|
||||||
UnalterableLogTool1=The law of some countries (like in France when doing B2C), ask that you do it on a regular basis.
|
UnalterableLogTool1=The law of some countries (like in France when doing B2C), ask that you do it on a regular basis.
|
||||||
UnalterableLogTool1FR=In France, you MUST generate archives, at least, once every year, we recommand to do it once per month. Also, you MUST keep these archives for at least 7 years. According to the law, It is the user's responsibility to store their archives on media that guarantee their preservation, including in the event of hardware failure, so we recommand to store them on at least 2 different physical supports.
|
UnalterableLogTool1FR=In France, you MUST generate archives of the unalterable logs, at least, once every year. We recommand to do it once per month. Also, you MUST keep these archives for at least 7 years. According to the law, It is the user's responsibility to store their archives on media that guarantee their preservation, including in the event of hardware failure, so we recommand to store them on at least 2 different physical supports.
|
||||||
UnalterableLogTool2=This unalterable Logs contains the history of unalterable data. It is the responsibility of the application user to ensure system backups, in order to comply with legal obligations. If you decide to secure your unalterable logs by exporting and storing archives files instead of a full database backup (tab <b>%s</b>), it is recommended to store the exported archive files in different places (Secured cloud, External USB drive, ...).
|
UnalterableLogTool2=This unalterable Logs contains the history of unalterable data. It is the responsibility of the application user to ensure system backups, in order to comply with legal obligations. If you decide to secure your unalterable logs by exporting and storing archives files instead of a full database backup (tab <b>%s</b>), it is recommended to store the exported archive files in different places (Secured cloud, External USB drive, ...).
|
||||||
UnalterableLogTool3=Note that, there is no feature to purge this log and every change tried to be done directly into this log (by a hacker for example) will be reported with a non-valid fingerprint.
|
UnalterableLogTool3=Note that, there is no feature to purge this log and every change tried to be done directly into this log (by a hacker for example) will be reported with a non-valid fingerprint.
|
||||||
FingerprintsDesc2=If you really need to purge this table because you used your application for a demo/test purpose and want to clean your data to start your production, you can ask your reseller or integrator to reset your database (all your data will be removed).
|
FingerprintsDesc2=If you really need to purge this table because you used your application for a demo/test purpose and want to clean your data to start your production, you can ask your reseller or integrator to reset your database (all your data will be removed).
|
||||||
@@ -24,6 +24,7 @@ BlockedlogInfoDialog=Log Details
|
|||||||
ListOfTrackedEvents=List of tracked events
|
ListOfTrackedEvents=List of tracked events
|
||||||
Fingerprint=Fingerprint
|
Fingerprint=Fingerprint
|
||||||
FingerprintExport=Fingerprint export
|
FingerprintExport=Fingerprint export
|
||||||
|
FingerprintExportHMAC=Fingerprint export HMAC
|
||||||
DownloadLogCSV=Export unalterable logs (CSV)
|
DownloadLogCSV=Export unalterable logs (CSV)
|
||||||
DataOfArchivedEvent=Complete data of archived event
|
DataOfArchivedEvent=Complete data of archived event
|
||||||
DataOfArchivedEventHelp=This field contains the complementary data that was archived on real time. Even if some parent business event could have been canceled or modified, the data stored here is the original data, and it can't be modified.
|
DataOfArchivedEventHelp=This field contains the complementary data that was archived on real time. Even if some parent business event could have been canceled or modified, the data stored here is the original data, and it can't be modified.
|
||||||
@@ -51,6 +52,9 @@ TotalForAction=Total for event %s
|
|||||||
SecretKey=Secret key
|
SecretKey=Secret key
|
||||||
ErrorPeriodMustBePastToAllowExport=Export into archives is allowed only if period is completely past
|
ErrorPeriodMustBePastToAllowExport=Export into archives is allowed only if period is completely past
|
||||||
RegistrationNumber=Registration number
|
RegistrationNumber=Registration number
|
||||||
|
NumberOfPrints=Number of prints
|
||||||
|
NumberOfEmailsSent=Number of emails sent
|
||||||
|
VatCode=Vat code
|
||||||
|
|
||||||
## logTypes
|
## logTypes
|
||||||
logBILL_DELETE=Customer invoice logically deleted
|
logBILL_DELETE=Customer invoice logically deleted
|
||||||
|
|||||||
Reference in New Issue
Block a user