X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=0dabe9ec10a3e5a8ce58ba281ac6813fe8b62fd3;hb=505322c4b9b99beb3c0f1246edbfc54ff3a36790;hp=aba9c3eb83d807494ac5a6762b3a7709c574a5bc;hpb=5b8e9fcb2f9c94d69519c927b8aa59184d93cea3;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index aba9c3eb8..0dabe9ec1 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -429,7 +429,7 @@ sub form_header { } } - $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase show_form_details show_history show_vc_details)); + $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase show_form_details show_history show_vc_details ckeditor/ckeditor ckeditor/adapters/jquery)); $form->header; if ($form->{CFDD_shipto} && $form->{CFDD_shipto_id} ) { @@ -787,9 +787,10 @@ sub orders { my @columns = ( "transdate", "reqdate", "id", $ordnumber, - "customernumber", + "cusordnumber", "customernumber", "name", "netamount", "tax", "amount", + "remaining_netamount", "remaining_amount", "curr", "employee", "salesman", "shipvia", "globalprojectnumber", @@ -834,7 +835,7 @@ sub orders { my $report = SL::ReportGenerator->new(\%myconfig, $form); my @hidden_variables = map { "l_${_}" } @columns; - push @hidden_variables, "l_subtotal", $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered ordnumber quonumber + push @hidden_variables, "l_subtotal", $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered ordnumber quonumber cusordnumber transaction_description transdatefrom transdateto type vc employee_id salesman_id reqdatefrom reqdateto projectnumber project_id periodic_invoices_active periodic_invoices_inactive business_id shippingpoint taxzone_id); @@ -851,11 +852,14 @@ sub orders { 'id' => { 'text' => $locale->text('ID'), }, 'ordnumber' => { 'text' => $locale->text('Order'), }, 'quonumber' => { 'text' => $form->{type} eq "request_quotation" ? $locale->text('RFQ') : $locale->text('Quotation'), }, + 'cusordnumber' => { 'text' => $locale->text('Customer Order Number'), }, 'name' => { 'text' => $form->{vc} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), }, 'customernumber' => { 'text' => $locale->text('Customer Number'), }, 'netamount' => { 'text' => $locale->text('Amount'), }, 'tax' => { 'text' => $locale->text('Tax'), }, 'amount' => { 'text' => $locale->text('Total'), }, + 'remaining_amount' => { 'text' => $locale->text('Remaining Amount'), }, + 'remaining_netamount' => { 'text' => $locale->text('Remaining Net Amount'), }, 'curr' => { 'text' => $locale->text('Curr'), }, 'employee' => { 'text' => $locale->text('Employee'), }, 'salesman' => { 'text' => $locale->text('Salesman'), }, @@ -874,12 +878,12 @@ sub orders { 'taxzone' => { 'text' => $locale->text('Steuersatz'), }, ); - foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee salesman shipvia transaction_description shippingpoint taxzone)) { + foreach my $name (qw(id transdate reqdate quonumber ordnumber cusordnumber name employee salesman shipvia transaction_description shippingpoint taxzone)) { my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; } - my %column_alignment = map { $_ => 'right' } qw(netamount tax amount curr); + my %column_alignment = map { $_ => 'right' } qw(netamount tax amount curr remaining_amount remaining_netamount); $form->{"l_type"} = "Y"; map { $column_defs{$_}->{visible} = $form->{"l_${_}"} ? 1 : 0 } @columns; @@ -897,6 +901,7 @@ sub orders { push @options, $locale->text('Vendor') . " : $form->{vendor}" if $form->{vendor}; push @options, $locale->text('Department') . " : $department" if $form->{department}; push @options, $locale->text('Order Number') . " : $form->{ordnumber}" if $form->{ordnumber}; + push @options, $locale->text('Customer Order Number') . " : $form->{cusordnumber}" if $form->{cusordnumber}; push @options, $locale->text('Notes') . " : $form->{notes}" if $form->{notes}; push @options, $locale->text('Transaction description') . " : $form->{transaction_description}" if $form->{transaction_description}; push @options, $locale->text('Shipping Point') . " : $form->{shippingpoint}" if $form->{shippingpoint}; @@ -940,7 +945,7 @@ sub orders { # escape callback for href my $callback = $form->escape($href); - my @subtotal_columns = qw(netamount amount marge_total marge_percent); + my @subtotal_columns = qw(netamount amount marge_total marge_percent remaining_amount remaining_netamount); my %totals = map { $_ => 0 } @subtotal_columns; my %subtotals = map { $_ => 0 } @subtotal_columns; @@ -963,7 +968,7 @@ sub orders { $subtotals{marge_percent} = $subtotals{netamount} ? ($subtotals{marge_total} * 100 / $subtotals{netamount}) : 0; $totals{marge_percent} = $totals{netamount} ? ($totals{marge_total} * 100 / $totals{netamount} ) : 0; - map { $oe->{$_} = $form->format_amount(\%myconfig, $oe->{$_}, 2) } qw(netamount tax amount marge_total marge_percent); + map { $oe->{$_} = $form->format_amount(\%myconfig, $oe->{$_}, 2) } qw(netamount tax amount marge_total marge_percent remaining_amount remaining_netamount); my $row = { }; @@ -1993,6 +1998,7 @@ sub _oe_remove_delivered_or_billed_rows { my %handled_base_qtys; foreach my $record (@{ $ord_quot->linked_records(%args) }) { next if $ord_quot->is_sales != $record->is_sales; + next if $record->type eq 'invoice' && $record->storno; foreach my $item (@{ $record->items }) { my $key = $item->parts_id;