[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8932] bkbooking: bugfix agresso export
From: |
Kjell Arne Espedal |
Subject: |
[Fmsystem-commits] [8932] bkbooking: bugfix agresso export |
Date: |
Mon, 20 Feb 2012 14:38:34 +0000 |
Revision: 8932
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8932
Author: kjell
Date: 2012-02-20 14:38:33 +0000 (Mon, 20 Feb 2012)
Log Message:
-----------
bkbooking: bugfix agresso export
Modified Paths:
--------------
trunk/booking/inc/class.socompleted_reservation_export.inc.php
trunk/booking/inc/class.socompleted_reservation_export_file.inc.php
Modified: trunk/booking/inc/class.socompleted_reservation_export.inc.php
===================================================================
--- trunk/booking/inc/class.socompleted_reservation_export.inc.php
2012-02-20 12:31:35 UTC (rev 8931)
+++ trunk/booking/inc/class.socompleted_reservation_export.inc.php
2012-02-20 14:38:33 UTC (rev 8932)
@@ -457,7 +457,6 @@
$columns[] = 'short_info';
$output[] = $this->format_to_csv_line($columns);
-
foreach ($reservations as $reservation) {
if ($this->get_cost_value($reservation['cost'])
<= 0) {
continue; //Don't export costless rows
@@ -640,6 +639,7 @@
$stored_header = array();
$line_no = 0;
+ $header_count = 0;
foreach($reservations as &$reservation) {
if ($this->get_cost_value($reservation['cost'])
<= 0) {
continue; //Don't export costless rows
@@ -650,7 +650,7 @@
{
$order_id =
$sequential_number_generator->increment()->get_current();
$export_info[] =
$this->create_export_item_info($reservation, $order_id);
-
+ $header_count += 1;
//header level
$header =
$this->get_agresso_row_template();
$header['accept_flag'] = '1';
@@ -878,8 +878,8 @@
if (count($export_info) == 0) {
return null;
}
-
- return array('data' => implode("\n", $output), 'info'
=> $export_info);
+
+ return array('data' => implode("\n", $output), 'info'
=> $export_info, 'header_count' => $header_count);
}
protected function get_agresso_row_template() {
Modified: trunk/booking/inc/class.socompleted_reservation_export_file.inc.php
===================================================================
--- trunk/booking/inc/class.socompleted_reservation_export_file.inc.php
2012-02-20 12:31:35 UTC (rev 8931)
+++ trunk/booking/inc/class.socompleted_reservation_export_file.inc.php
2012-02-20 14:38:33 UTC (rev 8932)
@@ -121,6 +121,9 @@
if
(!is_null($export_result['export'])) {
$export_infos[$export_type][] = $export_result['export']['info'];
}
+ if ($export_type == 'external') {
+
$export_result['total_items'] = $export_result['export']['header_count'];
+ }
$export_configurations[$export_type][$export['id']] = $conf;
$total_items[$export_type] +=
$export_result['total_items'];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8932] bkbooking: bugfix agresso export,
Kjell Arne Espedal <=