WHERE salesman';
my $business_ids = [
map(
- { $_->{id} }
+ { $_->{id}; }
selectall_hashref_query($::form, $dbh, $query)
)
];
$self->{template_args} ||= {};
$::request->{layout}->add_javascripts('autocomplete_customer.js');
+ $::request->{layout}->add_javascripts('kivi.CustomerVendor.js');
}
1;
namespace('kivi.CustomerVendor', function(ns) {
- var kivi = namespace('kivi');
-
this.selectShipto = function(params) {
var shiptoId = $('#shipto_shipto_id').val();
[%- END %]
[%- IF ( SELF.cv.id ) %]
- <input type="button" class="submit" onclick="namespace('kivi.CustomerVendor').showHistoryWindow([% SELF.cv.id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
+ <input type="button" class="submit" onclick="kivi.CustomerVendor.showHistoryWindow([% SELF.cv.id %]);" name="history" id="history" value="[% 'history' | $T8 %]">
[%- END %]
</form>
[% L.input_tag('cv.street', SELF.cv.street, size = 35, maxlength = 75) %]
<span id="billing_map"></span>
<script type="text/javascript">
- namespace('kivi.CustomerVendor').showMapWidget('cv_', $('#billing_map'));
+ kivi.CustomerVendor.showMapWidget('cv_', $('#billing_map'));
</script>
</td>
</tr>
empty_title = LxERP.t8('New contact'),
value_key = 'cp_id',
title_key = 'full_name',
- onchange = "namespace('kivi.CustomerVendor').selectContact({onFormSet: function(){contactsMapWidget.testInputs();}});",
+ onchange = "kivi.CustomerVendor.selectContact({onFormSet: function(){contactsMapWidget.testInputs();}});",
)
%]
</td>
[% L.input_tag('contact.cp_street', SELF.contact.cp_street, size = 40, maxlength = 75) %]
<span id="contact_map"></span>
<script type="text/javascript">
- var contactsMapWidget = namespace('kivi.CustomerVendor').showMapWidget('contact_cp_', $('#contact_map'));
+ var contactsMapWidget = kivi.CustomerVendor.showMapWidget('contact_cp_', $('#contact_map'));
</script>
</td>
</tr>
value_key = 'shipto_id',
title_key = 'displayable_id',
with_empty = 1,
- onchange = "namespace('kivi.CustomerVendor').selectDelivery();"
+ onchange = "kivi.CustomerVendor.selectDelivery();"
)
%]
</td>
L.date_tag(
'delivery_from',
FORM.delivery_from,
- onchange => "namespace('kivi.CustomerVendor').selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);"
+ onchange => "kivi.CustomerVendor.selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);"
)
%]
</td>
L.date_tag(
'delivery_to',
FORM.delivery_to,
- onchange => "namespace('kivi.CustomerVendor').selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);"
+ onchange => "kivi.CustomerVendor.selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);"
)
%]
</td>
title_key = 'displayable_id',
with_empty = 1,
empty_title = LxERP.t8('New shipto'),
- onchange = "namespace('kivi.CustomerVendor').selectShipto({onFormSet: function(){shiptoMapWidget.testInputs();}});",
+ onchange = "kivi.CustomerVendor.selectShipto({onFormSet: function(){shiptoMapWidget.testInputs();}});",
)
%]
</td>
<span id="shipto_map"></span>
<script type="text/javascript">
- var shiptoMapWidget = namespace('kivi.CustomerVendor').showMapWidget('shipto_shipto', $('#shipto_map'));
+ var shiptoMapWidget = kivi.CustomerVendor.showMapWidget('shipto_shipto', $('#shipto_map'));
</script>
</td>
</tr>