[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11529] property: remove obsolete
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11529] property: remove obsolete |
Date: |
Thu, 12 Dec 2013 14:50:48 +0000 |
Revision: 11529
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11529
Author: sigurdne
Date: 2013-12-12 14:50:47 +0000 (Thu, 12 Dec 2013)
Log Message:
-----------
property: remove obsolete
Removed Paths:
-------------
trunk/property/inc/import/default/cvs_import_oppdatering_av_bestilling_fra_agresso_bkb
Deleted:
trunk/property/inc/import/default/cvs_import_oppdatering_av_bestilling_fra_agresso_bkb
===================================================================
---
trunk/property/inc/import/default/cvs_import_oppdatering_av_bestilling_fra_agresso_bkb
2013-12-12 14:50:25 UTC (rev 11528)
+++
trunk/property/inc/import/default/cvs_import_oppdatering_av_bestilling_fra_agresso_bkb
2013-12-12 14:50:47 UTC (rev 11529)
@@ -1,93 +0,0 @@
-<?php
- class import_conversion
- {
- protected $db;
- public $messages = array();
- public $warnings = array();
- public $errors = array();
- public $fields = array();
- public $debug = true;
-
- public function __construct()
- {
- set_time_limit(10000); //Set the time limit for this
request
- $this->account =
(int)$GLOBALS['phpgw_info']['user']['account_id'];
- $this->db = & $GLOBALS['phpgw']->db;
-
phpgwapi_cache::session_clear('property','tts_listing_metadata');
- }
-
- public function add($data)
- {
- $fields = $this->fields;
-
- $agresso_prosjekt = $this->decode($data[0]);
- $prosjektstatus = $this->decode($data[1]);
- $order_id = $this->decode($data[2]);
- $actual_cost = (float)$this->decode($data[3]);
-
- $this->db->query("SELECT id, actual_cost FROM
fm_tts_tickets WHERE order_id= '{$order_id}'",__LINE__,__FILE__);
- $this->db->next_record();
- $id = $this->db->f('id');
- $old_actual_cost = $this->db->f('actual_cost');
-
- if(!$id)
- {
- $this->errors[] = "Fant ikke bestillingen,
hopper over: {$order_id}";
- return false;
- }
-
- $this->messages[] = "Oppdaterer melding #{$id}, gammelt
beløp: {$old_actual_cost}, nytt beløp: {$actual_cost}";
-
- $value_set = array
- (
- 'agresso_prosjekt' => $agresso_prosjekt,
- 'actual_cost' => $actual_cost
- );
-
- $value_set =
$this->db->validate_update($value_set);
- $ok = $this->db->query("UPDATE fm_tts_tickets SET
$value_set WHERE id={$id}",__LINE__,__FILE__);
-
-
-// $prosjektstatus;
-
-/*
- $ticket = array
- (
- 'status' => '';
- );
-
- $sotts = CreateObject('property.sotts');
- $sotts->update_status($ticket,$id)
-*/
- return $ok;
- }
-
-
- /**
- * Convert from the locale encoding to UTF-8 encoding and
escape single quotes
- *
- * @param string $value The value to convert
- * @return string
- */
- protected function decode($value)
- {
- $converted = trim($value);//
mb_convert_encoding($value, 'UTF-8');
- if ($this->is_null($converted))
- {
- return null;
- }
- return stripslashes($converted);
- }
-
- /**
- * Test a value for null according to several formats that can
exist in the export.
- * Returns true if the value is null according to these rules,
false otherwise.
- *
- * @param string $value The value to test
- * @return bool
- */
- protected function is_null($value)
- {
- return ((trim($value) == "") || ($data == "<NULL>") ||
($data == "''"));
- }
- }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11529] property: remove obsolete,
Sigurd Nes <=