0
1
Fork 0

EDI: Added field RFF+VN(vendorOrderNumber)

This commit is contained in:
Juan Ferrer 2022-06-27 16:41:58 +02:00
parent 9ca2f78103
commit 00c7f9da0d
4 changed files with 21 additions and 12 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.408.1) stable; urgency=low
hedera-web (1.408.2) stable; urgency=low
* Initial Release.

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.408.1",
"version": "1.408.2",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

View File

@ -54,15 +54,6 @@ class Load extends Edi\Method {
else
$sender = NULL;
$db->query('CALL mail_new(#messageId, #sender, @mailFk)', [
'messageId' => $messageId,
'sender' => $sender
]);
$mailId = $db->getValue("SELECT @mailFk");
echo "Message from: $sender\n";
echo " -> Message id: $messageId\n";
if ($this->restrictToSenders) {
$isAllowed = $db->getValue(
"SELECT COUNT(*) > 0 FROM mailSender WHERE mail = #",
@ -73,6 +64,15 @@ class Load extends Edi\Method {
throw new Exception('Mail processing from unknown senders is disabled');
}
$db->query('CALL mail_new(#messageId, #sender, @mailFk)', [
'messageId' => $messageId,
'sender' => $sender
]);
$mailId = $db->getValue("SELECT @mailFk");
echo "Message from: $sender\n";
echo " -> Message id: $messageId\n";
// Searches the EDI message on mail parts
$matchTypes = [TYPEAPPLICATION, TYPETEXT];
@ -98,6 +98,14 @@ class Load extends Edi\Method {
if (!Edi\Message::isEdiString($ediString))
continue;
$db->query(
'UPDATE ekt
SET source = #source
WHERE id = #mailId', [
'source' => $ediString,
'mailId' => $mailId
]);
// Creates the EDI object and loads its exchanges
$ediMessage = new Edi\Message();

View File

@ -3,6 +3,7 @@ CALL exchange_new (
#art,
#bgm,
#batchNumber,
#vendorOrderNumber,
#aaj,
#fec,
#hor,