[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11530] property:update import
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11530] property:update import |
Date: |
Fri, 13 Dec 2013 14:35:02 +0000 |
Revision: 11530
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11530
Author: sigurdne
Date: 2013-12-13 14:35:00 +0000 (Fri, 13 Dec 2013)
Log Message:
-----------
property:update import
Modified Paths:
--------------
trunk/property/inc/class.boinvoice.inc.php
trunk/property/inc/class.uiimport.inc.php
trunk/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
trunk/property/inc/export/default/Agresso_X114
Modified: trunk/property/inc/class.boinvoice.inc.php
===================================================================
--- trunk/property/inc/class.boinvoice.inc.php 2013-12-12 14:50:47 UTC (rev
11529)
+++ trunk/property/inc/class.boinvoice.inc.php 2013-12-13 14:35:00 UTC (rev
11530)
@@ -310,7 +310,7 @@
}
else
{
- $_lag = date('n') == 1 ? 17 :
7;//6 days into next month, 16 days into next year
+ $_lag = date('n') == 1 ? 11 :
7;//6 days into next month, 10 days into next year
$_lag_seconds = $_lag * 24 * 3600;
}
Modified: trunk/property/inc/class.uiimport.inc.php
===================================================================
--- trunk/property/inc/class.uiimport.inc.php 2013-12-12 14:50:47 UTC (rev
11529)
+++ trunk/property/inc/class.uiimport.inc.php 2013-12-13 14:35:00 UTC (rev
11530)
@@ -54,7 +54,8 @@
$this->valid_tables = array
(
'fm_vendor' =>
'fm_vendor (' . lang('vendor') . ')',
- 'fm_condition_survey' => 'fm_condition_survey
(' . lang('condition survey') . ')'
+ 'fm_condition_survey' => 'fm_condition_survey
(' . lang('condition survey') . ')',
+ 'fm_ecodimb' => 'fm_ecodimb
(' . lang('dimb') . ')',
);
$location_types =
execMethod('property.soadmin_location.select_location_type');
Modified:
trunk/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
===================================================================
---
trunk/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
2013-12-12 14:50:47 UTC (rev 11529)
+++
trunk/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
2013-12-13 14:35:00 UTC (rev 11530)
@@ -374,13 +374,15 @@
$agresso_prosjekt = (int)$data[0];
$prosjektstatus = trim($data[1]);
$order_id = trim($data[2]);
- $actual_cost = (float)trim($data[3]);
+ $diff_actual_cost = (float)trim($data[3]);
$this->db->query("SELECT id, status, actual_cost FROM
fm_tts_tickets WHERE order_id= '{$order_id}'",__LINE__,__FILE__);
$this->db->next_record();
- $id =
$this->db->f('id');
- $old_status =
$this->db->f('status');
- $old_actual_cost = $this->db->f('actual_cost');
+ $id
= $this->db->f('id');
+ $old_status =
$this->db->f('status');
+ (float) $old_actual_cost =
$this->db->f('actual_cost');
+
+ $new_actual_cost = $diff_actual_cost + $old_actual_cost;
if(!$id)
{
@@ -388,12 +390,12 @@
return false;
}
- $this->receipt['message'][] = array('msg' =>"Oppdaterer
melding #{$id}, gammelt beløp: {$old_actual_cost}, nytt beløp: {$actual_cost}");
+ $this->receipt['message'][] = array('msg' =>"Oppdaterer
melding #{$id}, gammelt beløp: {$old_actual_cost}, nytt beløp:
{$new_actual_cost}");
$value_set = array
(
- 'agresso_prosjekt' => $agresso_prosjekt,
- 'actual_cost' => $actual_cost
+ 'agresso_prosjekt' => $agresso_prosjekt,
+ 'actual_cost' => $new_actual_cost
);
$value_set =
$this->db->validate_update($value_set);
@@ -420,7 +422,7 @@
if(!$id)
{
- $this->receipt['error'][] = array('msg'
=>"Oppdatere status: fant ikke bestillingen, hopper over: {$order_id}");
+ $this->receipt['error'][] = array('msg'
=>"Oppdatere status: fant ikke bestillingen, hopper over: {$agresso_prosjekt}");
return false;
}
Modified: trunk/property/inc/export/default/Agresso_X114
===================================================================
--- trunk/property/inc/export/default/Agresso_X114 2013-12-12 14:50:47 UTC
(rev 11529)
+++ trunk/property/inc/export/default/Agresso_X114 2013-12-13 14:35:00 UTC
(rev 11530)
@@ -92,7 +92,7 @@
}
else
{
- $_lag = date('n') == 1 ? 17 :
7;//6 days into next month, 16 days into next year
+ $_lag = date('n') == 1 ? 11 :
7;//6 days into next month, 10 days into next year
$_lag_seconds = $_lag * 24 * 3600;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11530] property:update import,
Sigurd Nes <=