[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [17098] property: order receive
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [17098] property: order receive |
Date: |
Tue, 19 Sep 2017 08:52:35 -0400 (EDT) |
Revision: 17098
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17098
Author: sigurdne
Date: 2017-09-19 08:52:35 -0400 (Tue, 19 Sep 2017)
Log Message:
-----------
property: order receive
Modified Paths:
--------------
trunk/property/inc/cron/default/Import_fra_agresso_X205_BK.php
trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
Modified: trunk/property/inc/cron/default/Import_fra_agresso_X205_BK.php
===================================================================
--- trunk/property/inc/cron/default/Import_fra_agresso_X205_BK.php
2017-09-19 12:26:43 UTC (rev 17097)
+++ trunk/property/inc/cron/default/Import_fra_agresso_X205_BK.php
2017-09-19 12:52:35 UTC (rev 17098)
@@ -426,6 +426,7 @@
}
$update_voucher = false;
+ $receive_order_performed = false;
$sql = "SELECT bilagsnr, bilagsnr_ut FROM
fm_ecobilag WHERE external_voucher_id = '{$_data['KEY']}'";
$this->db->query($sql, __LINE__, __FILE__);
if ($this->db->next_record())
@@ -432,6 +433,7 @@
{
$this->skip_update_voucher_id = true;
$update_voucher = true;
+ $receive_order_performed = true;
$bilagsnr = $this->db->f('bilagsnr');
$buffer[$i]['bilagsnr'] = $bilagsnr;
$this->receipt['message'][] =
array('msg' => "Oppdatert med nye data i arbeidsregister: ordre = {$_order_id},
bilag = {$_data['KEY']}");
@@ -443,6 +445,7 @@
{
$this->skip_update_voucher_id = true;
$update_voucher = true;
+ $receive_order_performed = true;
$bilagsnr = $this->db->f('bilagsnr');
$buffer[$i]['bilagsnr'] = $bilagsnr;
@@ -543,7 +546,7 @@
{
$bilagsnr =
$this->import_end_file($buffer);
-
if($this->config->config_data['export']['auto_receive_order'])
+ if(!$receive_order_performed &&
$this->config->config_data['export']['auto_receive_order'])
{
$received_amount =
$this->get_total_received((int)$order_id);
Modified:
trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
===================================================================
---
trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
2017-09-19 12:26:43 UTC (rev 17097)
+++
trunk/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
2017-09-19 12:52:35 UTC (rev 17098)
@@ -108,8 +108,12 @@
throw new Exception("Ordrenummer
'{$values['order_id']}' er utenfor serien:<br/>" . __FILE__ . '<br/>linje:' .
__LINE__);
}
- if($this->ordered_amount)
+ if(empty($this->values['continuous']))
{
+ $quantity = 1; // closing the order
+ }
+ else if($this->ordered_amount)
+ {
$quantity =
$received_amount/$this->ordered_amount;
}
else //should not happen, but just in case...
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [17098] property: order receive,
sigurdne <=