[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16111] more on integration
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16111] more on integration |
Date: |
Fri, 23 Dec 2016 10:16:45 +0000 (UTC) |
Revision: 16111
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16111
Author: sigurdne
Date: 2016-12-23 10:16:45 +0000 (Fri, 23 Dec 2016)
Log Message:
-----------
more on integration
Modified Paths:
--------------
trunk/property/inc/class.uiwo_hour.inc.php
trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
Modified: trunk/property/inc/class.uiwo_hour.inc.php
===================================================================
--- trunk/property/inc/class.uiwo_hour.inc.php 2016-12-21 20:03:24 UTC (rev
16110)
+++ trunk/property/inc/class.uiwo_hour.inc.php 2016-12-23 10:16:45 UTC (rev
16111)
@@ -1520,7 +1520,7 @@
{
if ($e)
{
- throw $e;
+
phpgwapi_cache::message_set($e->getMessage(), 'error');
}
}
Modified: trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
===================================================================
--- trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2016-12-21 20:03:24 UTC (rev 16110)
+++ trunk/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2016-12-23 10:16:45 UTC (rev 16111)
@@ -164,8 +164,8 @@
'BuyerProductDescr' => $line['descr'],
//'Kopipapir',
'UnitCode' => 'STK',
'Quantity' => 1,
- 'Price' => $line['price'],
- 'LineTotal'=> $line['price'],
+ 'Price' =>
number_format($line['price'], 2, '.', ''),
+ 'LineTotal'=>
number_format($line['price'], 2, '.', ''),
'DetailInfo' => $DetailInfo
);
@@ -175,7 +175,7 @@
$Orders['Order'][] = array(
'OrderNo' => $param['order_id'],
- 'VoucherType' => $param['voucher_type'],
+ 'VoucherType' => $this->voucher_type,
'TransType' => 41,
'Header' => array($Header),
'Details' => array('Detail' => $Detail)
Modified:
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
===================================================================
---
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
2016-12-21 20:03:24 UTC (rev 16110)
+++
trunk/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
2016-12-23 10:16:45 UTC (rev 16111)
@@ -68,12 +68,12 @@
if($approval_level == 'project')
{
$approval_amount =
ExecMethod('property.boworkorder.get_accumulated_budget_amount',
$workorder['project_id']);
- $price =
ExecMethod('property.boworkorder.get_budget_amount', $workorder['id']);
+ $price = (float)
ExecMethod('property.boworkorder.get_budget_amount', $workorder['id']);
}
else
{
$approval_amount =
ExecMethod('property.boworkorder.get_budget_amount', $workorder['id']);
- $price = $approval_amount;
+ $price = (float) $approval_amount;
}
@@ -119,17 +119,34 @@
$user_name =
$GLOBALS['phpgw']->accounts->get($workorder['user_id'])->__toString();
$account_lid =
$GLOBALS['phpgw']->accounts->id2lid($workorder['user_id']);
+
+ if ($workorder['ecodimb'])
+ {
+ $dim1 = $workorder['ecodimb'];
+ }
+ else if ($project['ecodimb'])
+ {
+ $dim1 = $project['ecodimb'];
+ }
+ else
+ {
+ throw new Exception('Dimensjonen "Ansvar"
mangler');
+ }
+
if ($workorder['location_code'])
{
$location_code = $workorder['location_code'];
$location = explode('-', $location_code);
- $dim3 = isset($location[1]) && $location[1] ?
"{$location[0]}{$location[1]}" : "{$location[0]}01";
+// $dim3 = isset($location[1]) && $location[1] ?
"{$location[0]}{$location[1]}" : "{$location[0]}01";
+ $dim3 = $location[0];
+
}
else if ($project['location_code'])
{
$location_code = $project['location_code'];
$location = explode('-', $location_code);
- $dim3 = isset($location[1]) && $location[1] ?
"{$location[0]}{$location[1]}" : "{$location[0]}01";
+// $dim3 = isset($location[1]) && $location[1] ?
"{$location[0]}{$location[1]}" : "{$location[0]}01";
+ $dim3 = $location[0];
}
else
{
@@ -158,9 +175,9 @@
),
'BuyerReferences' => array(
array(
- 'Responsible' => $account_lid,
- 'RequestedBy' => $account_lid,
- 'Accountable' => $account_lid,
+ 'Responsible' =>
strtoupper($account_lid),
+ 'RequestedBy' =>
strtoupper($account_lid),
+ 'Accountable' =>
strtoupper($account_lid),
)
)
);
@@ -252,7 +269,7 @@
$param = array(
'dim0' => $workorder['b_account_id'], // Art
- 'dim1' => $workorder['ecodimb'], // Ansvar
+ 'dim1' => $dim1, // Ansvar
'dim2' => $tjeneste, // Tjeneste liste 30 stk,
default 9
'dim3' => $dim3, // Objekt: eiendom + bygg: 6
siffer
'dim4' => $workorder['contract_id'], //
Kontrakt - frivillig / 9, 7 tegn - alfanumerisk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16111] more on integration,
sigurdne <=