my $curr_employee = SL::DB::Manager::Employee->current;
- foreach ( 'cv.creditlimit', 'cv.discount' ) {
- my ($namespace, $varname) = split('.', $_, 2);
- $::form->{$namespace}->{$varname} = $::form->parse_amount(\%::myconfig, $::form->{$namespace}->{$varname});
- }
- $::form->{cv}->{discount} /= 100;
-
if ( $::form->{cv}->{id} ) {
if ( $self->is_vendor() ) {
$self->{cv} = SL::DB::Vendor->new(id => $::form->{cv}->{id})->load();
$self->{template_args} = {};
- $self->{cv}->discount($self->{cv}->discount * 100);
-
-
$::request->{layout}->add_javascripts('autocomplete_customer.js');
}
<th align="right">[% 'Credit Limit' | $T8 %]</th>
<td>
- [% L.input_tag('cv.creditlimit', LxERP.format_amount(SELF.cv.creditlimit, 0), size = 9) %]
+ [% L.input_tag('cv.creditlimit_as_number', SELF.cv.creditlimit_as_number, size = 9) %]
</td>
<th align="right">[% 'Discount' | $T8 %]</th>
<td>
- [% L.input_tag('cv.discount', SELF.cv.discount, size = 4) %]
+ [% L.input_tag('cv.discount_as_percent', SELF.cv.discount_as_percent, size = 4) %]
</td>
</tr>