[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [17187] property: contract imformation on order
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [17187] property: contract imformation on order |
Date: |
Sun, 22 Oct 2017 05:27:35 -0400 (EDT) |
Revision: 17187
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17187
Author: sigurdne
Date: 2017-10-22 05:27:34 -0400 (Sun, 22 Oct 2017)
Log Message:
-----------
property: contract imformation on order
Modified Paths:
--------------
trunk/property/inc/class.uitts.inc.php
trunk/property/js/portico/tts.view.js
Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php 2017-10-21 15:05:29 UTC (rev
17186)
+++ trunk/property/inc/class.uitts.inc.php 2017-10-22 09:27:34 UTC (rev
17187)
@@ -3130,9 +3130,21 @@
ExecMethod('property.bofiles.get_file',
phpgw::get_var('file_id', 'int'));
}
- public function get_vendor_contract($vendor_id = 0, $selected =
'')
+ public function get_vendor_contract($vendor_id = 0, $selected =
0)
{
- return $this->bocommon->get_vendor_contract($vendor_id,
$selected);
+ $contract_list =
$this->bocommon->get_vendor_contract($vendor_id, $selected);
+ if($contract_list)
+ {
+ array_unshift($contract_list, array('id' => -1,
'name' => lang('outside contract')));
+ }
+ if($selected)
+ {
+ foreach ($contract_list as &$contract)
+ {
+ $contract['selected'] = $selected ==
$contract['id'] ? 1 : 0;
+ }
+ }
+ return $contract_list;
}
Modified: trunk/property/js/portico/tts.view.js
===================================================================
--- trunk/property/js/portico/tts.view.js 2017-10-21 15:05:29 UTC (rev
17186)
+++ trunk/property/js/portico/tts.view.js 2017-10-22 09:27:34 UTC (rev
17187)
@@ -205,7 +205,16 @@
return;
}
- htmlString = "<option value=''>" +
data.length + " kontrakter funnet</option>"
+ if(data.length > 0)
+ {
+//
$("#vendor_contract_id").attr("data-validation", "required");
+ htmlString = "<option value=''>
kontrakter funnet</option>";
+ }
+ else
+ {
+ htmlString = "<option value=''>
kontrakter ikke funnet</option>";
+ }
+
var obj = data;
$.each(obj, function (i)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [17187] property: contract imformation on order,
sigurdne <=