edi/load: entryYear field fixes
gitea/hedera-web/pipeline/head This commit looks good
Details
gitea/hedera-web/pipeline/head This commit looks good
Details
This commit is contained in:
parent
574c63ea4e
commit
13e61acb2a
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.408.4) stable; urgency=low
|
||||
hedera-web (1.408.5) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.408.4",
|
||||
"version": "1.408.5",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
|
@ -188,6 +188,9 @@ class Load extends Edi\Method {
|
|||
if (isset($this->columns[$code]) && !empty($value))
|
||||
$insertValues[$code] = $value;
|
||||
|
||||
$year = $ediValues['fec']->format('Y');
|
||||
$insertValues['entryYear'] = $year;
|
||||
|
||||
$isNew = false;
|
||||
$update = false;
|
||||
|
||||
|
@ -229,18 +232,15 @@ class Load extends Edi\Method {
|
|||
}
|
||||
}
|
||||
|
||||
$db->call('ekt_refresh', [$ektFk, $mailId]);
|
||||
if ($isNew) $db->call('ekt_load', [$ektFk]);
|
||||
|
||||
$db->insert('exchange', [
|
||||
'mailFk' => $mailId,
|
||||
'typeFk' => $ediValues['bgm'],
|
||||
'ektFk' => $ektFk
|
||||
]);
|
||||
|
||||
$res = $db->call('ekt_refresh', [$ektFk]);
|
||||
if ($isNew) $res = $db->call('ekt_load', [$ektFk]);
|
||||
|
||||
if (!$res)
|
||||
throw new Exception('Failed to insert the line.');
|
||||
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue