NEW: Add management of date begin/end and discount for a customer price (Code)

This commit is contained in:
Kamel Khelifa
2025-02-25 15:09:05 +01:00
parent fbac78e6f8
commit 7ba21bd23d
17 changed files with 406 additions and 126 deletions

View File

@@ -327,22 +327,28 @@ class modService extends DolibarrModules
$this->export_permission[$r] = array(array("service", "export"));
$this->export_fields_array[$r] = array('p.rowid' => "Id", 'p.ref' => "Ref",
's.nom' => 'ThirdParty',
'pr.date_begin' => "AppliedPricesFrom",
'pr.date_end' => "AppliedPricesTo",
'pr.price_base_type' => "PriceBase",
'pr.price' => "PriceUnitPriceHT", 'pr.price_ttc' => "PriceUnitPriceTTC",
'pr.price_min' => "MinPriceUnitPriceHT", 'pr.price_min_ttc' => "MinPriceUnitPriceTTC",
'pr.tva_tx' => 'PriceVATRate',
'pr.default_vat_code' => 'PriceVATCode',
'pr.remise_percent' => 'Discount',
'pr.datec' => 'DateCreation');
if (is_object($mysoc) && $usenpr) {
$this->export_fields_array[$r]['pr.recuperableonly'] = 'NPR';
}
$this->export_entities_array[$r] = array('p.rowid' => "product", 'p.ref' => "product",
's.nom' => 'company',
'pr.date_begin' => "product",
'pr.date_end' => "product",
'pr.price_base_type' => "product", 'pr.price' => "product",
'pr.price_ttc' => "product",
'pr.price_min' => "product", 'pr.price_min_ttc' => "product",
'pr.tva_tx' => 'product',
'pr.default_vat_code' => 'product',
'pr.remise_percent' => 'product',
'pr.recuperableonly' => 'product',
'pr.datec' => "product");
$this->export_sql_start[$r] = 'SELECT DISTINCT ';