From: Thomas Heck Date: Wed, 26 Jun 2013 08:39:20 +0000 (+0200) Subject: Datenbank-Helper(*_as_number) verwenden X-Git-Tag: release-3.1.0beta1~161^2~30 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cb44d4433f14900820da519b9f9016342fde1b24;p=kivitendo-erp.git Datenbank-Helper(*_as_number) verwenden --- diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index 0fc7206dc..5985e94d7 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -533,12 +533,6 @@ sub _instantiate_args { 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(); @@ -765,9 +759,6 @@ sub _pre_render { $self->{template_args} = {}; - $self->{cv}->discount($self->{cv}->discount * 100); - - $::request->{layout}->add_javascripts('autocomplete_customer.js'); } diff --git a/templates/webpages/customer_vendor/form.html b/templates/webpages/customer_vendor/form.html index e29d097d0..bb84e9bb1 100644 --- a/templates/webpages/customer_vendor/form.html +++ b/templates/webpages/customer_vendor/form.html @@ -206,7 +206,7 @@ [% 'Credit Limit' | $T8 %] - [% 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) %] @@ -220,7 +220,7 @@ [% 'Discount' | $T8 %] - [% L.input_tag('cv.discount', SELF.cv.discount, size = 4) %] + [% L.input_tag('cv.discount_as_percent', SELF.cv.discount_as_percent, size = 4) %]