fix
This commit is contained in:
parent
e63bb8b2d3
commit
74883a6ab8
@ -10,6 +10,7 @@ $id_sale = (int) $argv[1];
|
|||||||
if($id_sale == 0) {
|
if($id_sale == 0) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
$dateNow = date('ymdHis');
|
||||||
|
|
||||||
function getName($id_product, $id_lang, $id_product_attribute = FALSE) {
|
function getName($id_product, $id_lang, $id_product_attribute = FALSE) {
|
||||||
$name = DB::getInstance()->getValue('
|
$name = DB::getInstance()->getValue('
|
||||||
@ -50,7 +51,6 @@ if($magistorModule->active) {
|
|||||||
global $regex_file_out;
|
global $regex_file_out;
|
||||||
$regex_file_out = '@^ART01(.*)\.(BAL|DAT)@';
|
$regex_file_out = '@^ART01(.*)\.(BAL|DAT)@';
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
$dateNow = date('ymdHis');
|
|
||||||
$fileName = dirname(__FILE__) . '/OUT/ART01' . $dateNow;
|
$fileName = dirname(__FILE__) . '/OUT/ART01' . $dateNow;
|
||||||
|
|
||||||
$repo_archive = dirname(__FILE__) . '/archives/OUT/ARTICLES/';
|
$repo_archive = dirname(__FILE__) . '/archives/OUT/ARTICLES/';
|
||||||
@ -61,7 +61,7 @@ if($magistorModule->active) {
|
|||||||
mkdir($repo_archive);
|
mkdir($repo_archive);
|
||||||
}
|
}
|
||||||
|
|
||||||
$fileArchive = $repo_archive . 'ART01' . date('ymdHis');
|
$fileArchive = $repo_archive . 'ART01' . $dateNow;
|
||||||
|
|
||||||
$code_societe = (int)(Configuration::get('PHILEA_MAGISTOR_CODE_STE'));
|
$code_societe = (int)(Configuration::get('PHILEA_MAGISTOR_CODE_STE'));
|
||||||
$db = Db::getInstance();
|
$db = Db::getInstance();
|
||||||
@ -139,11 +139,12 @@ if($magistorModule->active) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($data != '') {
|
if($data != '') {
|
||||||
|
$file = 'ART01'.$dateNow.'.DAT';
|
||||||
Db::getInstance()->Execute('
|
Db::getInstance()->Execute('
|
||||||
INSERT INTO `'._DB_PREFIX_.'philea_syncreport` (`id_sale`, `filename`, `date_add`)
|
INSERT INTO `'._DB_PREFIX_.'philea_syncreport` (`id_sale`, `filename`, `date_add`)
|
||||||
VALUES (
|
VALUES (
|
||||||
'.(int)$id_sale.',
|
'.(int)$id_sale.',
|
||||||
"'.pSQL('ART01'.$dateNow.'.DAT').'",
|
"'.pSQL($file).'",
|
||||||
NOW()
|
NOW()
|
||||||
)
|
)
|
||||||
');
|
');
|
||||||
|
@ -15,6 +15,7 @@ $id_sale = (int) $argv[1];
|
|||||||
if($id_sale == 0) {
|
if($id_sale == 0) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
$dateNow = date('ymdHis');
|
||||||
|
|
||||||
$magistorModule = new philea_magistor();
|
$magistorModule = new philea_magistor();
|
||||||
$id_lang = Configuration::get('PS_LANG_DEFAULT');
|
$id_lang = Configuration::get('PS_LANG_DEFAULT');
|
||||||
@ -118,7 +119,6 @@ if($magistorModule->active) {
|
|||||||
|
|
||||||
//@TODO rendre configurable le champs "reference" entre "reference" et "ean13"
|
//@TODO rendre configurable le champs "reference" entre "reference" et "ean13"
|
||||||
$referenceField = 'reference';//Configuration::get('PHILEA_MAGISTOR_REF_FIELD');
|
$referenceField = 'reference';//Configuration::get('PHILEA_MAGISTOR_REF_FIELD');
|
||||||
$dateNow = date('ymdHis');
|
|
||||||
$fileName = dirname(__FILE__) . '/OUT/CDC02' . $dateNow;
|
$fileName = dirname(__FILE__) . '/OUT/CDC02' . $dateNow;
|
||||||
|
|
||||||
$repo_archive = dirname(__FILE__) . '/archives/OUT/CMD/';
|
$repo_archive = dirname(__FILE__) . '/archives/OUT/CMD/';
|
||||||
@ -330,11 +330,12 @@ if($magistorModule->active) {
|
|||||||
|
|
||||||
if($orders and is_array($orders))
|
if($orders and is_array($orders))
|
||||||
{
|
{
|
||||||
|
$file = 'CDC02'.$dateNow.'.DAT';
|
||||||
Db::getInstance()->Execute('
|
Db::getInstance()->Execute('
|
||||||
INSERT INTO `'._DB_PREFIX_.'philea_syncreport` (`id_sale`, `filename`, `date_add`)
|
INSERT INTO `'._DB_PREFIX_.'philea_syncreport` (`id_sale`, `filename`, `date_add`)
|
||||||
VALUES (
|
VALUES (
|
||||||
'.(int)$id_sale.',
|
'.(int)$id_sale.',
|
||||||
"'.pSQL('CDC02'.$dateNow.'.DAT').'",
|
"'.pSQL($file).'",
|
||||||
NOW()
|
NOW()
|
||||||
)
|
)
|
||||||
');
|
');
|
||||||
|
Loading…
Reference in New Issue
Block a user