X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/4ce66c79400b7019ddcfd4ac7d4f5ae6ff3dadf4..abd2e003bff87138fffc242229cf6e7367064904:/SL/Controller/Order.pm?ds=sidebyside diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 781babd5f..ba56e669e 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -170,7 +170,11 @@ sub action_set_item_values { ->val( '#' . $::form->{unit_dom_id}, $item->unit) ->val( '#' . $::form->{sellprice_dom_id}, $item->sellprice_as_number) ->val( '#' . $::form->{discount_dom_id}, $item->discount_as_percent) - ->run('recalc_linetotal', $::form->{item_id}, $::form->format_amount(\%::myconfig, $item->{linetotal}, -2)) + ->run('display_linetotal', $::form->{item_id}, $::form->format_amount(\%::myconfig, $item->{linetotal}, -2)) + ->html('#netamount_id', $::form->format_amount(\%::myconfig, $self->order->netamount, -2)) + ->html('#amount_id', $::form->format_amount(\%::myconfig, $self->order->amount, -2)) + ->remove('.tax_row') + ->insertBefore($self->build_tax_rows, '#amount_row_id') ->render($self); } @@ -250,6 +254,17 @@ sub build_shipto_select { ); } +sub build_tax_rows { + my ($self) = @_; + + my $rows_as_html; + foreach my $tax (@{ $self->{taxes} }) { + $rows_as_html .= $self->p->render('order/tabs/_tax_row', TAX => $tax); + } + return $rows_as_html; +} + + sub _make_order { my ($self) = @_;