Revision 6e196d1c
Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1084 | 1084 |
local $::locale = Locale->new($self->{recipient_locale}); |
1085 | 1085 |
|
1086 | 1086 |
my %formname_translations = ( |
1087 |
bin_list => $main::locale->text('Bin List'), |
|
1088 |
credit_note => $main::locale->text('Credit Note'), |
|
1089 |
invoice => $main::locale->text('Invoice'), |
|
1090 |
invoice_copy => $main::locale->text('Invoice Copy'), |
|
1087 |
bin_list => $main::locale->text('Bin List'),
|
|
1088 |
credit_note => $main::locale->text('Credit Note'),
|
|
1089 |
invoice => $main::locale->text('Invoice'),
|
|
1090 |
invoice_copy => $main::locale->text('Invoice Copy'),
|
|
1091 | 1091 |
invoice_for_advance_payment => $main::locale->text('Invoice for Advance Payment'), |
1092 |
final_invoice => $main::locale->text('Final Invoice'), |
|
1093 |
pick_list => $main::locale->text('Pick List'), |
|
1094 |
proforma => $main::locale->text('Proforma Invoice'), |
|
1095 |
purchase_order => $main::locale->text('Purchase Order'), |
|
1096 |
request_quotation => $main::locale->text('RFQ'), |
|
1097 |
sales_order => $main::locale->text('Confirmation'), |
|
1098 |
sales_quotation => $main::locale->text('Quotation'), |
|
1099 |
storno_invoice => $main::locale->text('Storno Invoice'), |
|
1100 |
sales_delivery_order => $main::locale->text('Delivery Order'), |
|
1101 |
purchase_delivery_order => $main::locale->text('Delivery Order'), |
|
1102 |
dunning => $main::locale->text('Dunning'), |
|
1103 |
dunning1 => $main::locale->text('Payment Reminder'), |
|
1104 |
dunning2 => $main::locale->text('Dunning'), |
|
1105 |
dunning3 => $main::locale->text('Last Dunning'), |
|
1106 |
dunning_invoice => $main::locale->text('Dunning Invoice'), |
|
1107 |
letter => $main::locale->text('Letter'), |
|
1108 |
ic_supply => $main::locale->text('Intra-Community supply'), |
|
1109 |
statement => $main::locale->text('Statement'), |
|
1092 |
final_invoice => $main::locale->text('Final Invoice'),
|
|
1093 |
pick_list => $main::locale->text('Pick List'),
|
|
1094 |
proforma => $main::locale->text('Proforma Invoice'),
|
|
1095 |
purchase_order => $main::locale->text('Purchase Order'),
|
|
1096 |
request_quotation => $main::locale->text('RFQ'),
|
|
1097 |
sales_order => $main::locale->text('Confirmation'),
|
|
1098 |
sales_quotation => $main::locale->text('Quotation'),
|
|
1099 |
storno_invoice => $main::locale->text('Storno Invoice'),
|
|
1100 |
sales_delivery_order => $main::locale->text('Delivery Order'),
|
|
1101 |
purchase_delivery_order => $main::locale->text('Delivery Order'),
|
|
1102 |
dunning => $main::locale->text('Dunning'),
|
|
1103 |
dunning1 => $main::locale->text('Payment Reminder'),
|
|
1104 |
dunning2 => $main::locale->text('Dunning'),
|
|
1105 |
dunning3 => $main::locale->text('Last Dunning'),
|
|
1106 |
dunning_invoice => $main::locale->text('Dunning Invoice'),
|
|
1107 |
letter => $main::locale->text('Letter'),
|
|
1108 |
ic_supply => $main::locale->text('Intra-Community supply'),
|
|
1109 |
statement => $main::locale->text('Statement'),
|
|
1110 | 1110 |
); |
1111 | 1111 |
|
1112 | 1112 |
$main::lxdebug->leave_sub(); |
... | ... | |
1133 | 1133 |
|
1134 | 1134 |
my $prefix = |
1135 | 1135 |
(first { $self->{type} eq $_ } qw(invoice invoice_for_advance_payment final_invoice credit_note)) ? 'inv' |
1136 |
: ($self->{type} =~ /_quotation$/) ? 'quo' |
|
1137 |
: ($self->{type} =~ /_delivery_order$/) ? 'do' |
|
1138 |
: ($self->{type} =~ /letter/) ? 'letter' |
|
1139 |
: 'ord'; |
|
1136 |
: ($self->{type} =~ /_quotation$/) ? 'quo'
|
|
1137 |
: ($self->{type} =~ /_delivery_order$/) ? 'do'
|
|
1138 |
: ($self->{type} =~ /letter/) ? 'letter'
|
|
1139 |
: 'ord';
|
|
1140 | 1140 |
|
1141 | 1141 |
# better default like this? |
1142 | 1142 |
# : ($self->{type} =~ /(sales|purcharse)_order/ : 'ord'; |
bin/mozilla/is.pl | ||
---|---|---|
429 | 429 |
t8('Further Invoice for Advance Payment'), |
430 | 430 |
submit => [ '#form', { action => "further_invoice_for_advance_payment" } ], |
431 | 431 |
checks => [ 'kivi.validate_form' ], |
432 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
433 |
: !$form->{id} ? t8('This invoice has not been posted yet.') |
|
434 |
: $has_further_invoice_for_advance_payment ? t8('This invoice has already a further invoice for advanced payment.') |
|
435 |
: $has_final_invoice ? t8('This invoice has already a final invoice.') |
|
432 |
disabled => !$may_edit_create ? t8('You must not change this invoice.')
|
|
433 |
: !$form->{id} ? t8('This invoice has not been posted yet.')
|
|
434 |
: $has_further_invoice_for_advance_payment ? t8('This invoice has already a further invoice for advanced payment.')
|
|
435 |
: $has_final_invoice ? t8('This invoice has already a final invoice.')
|
|
436 | 436 |
: $is_invoice_for_advance_payment_from_order ? t8('This invoice was added from an order. See there.') |
437 |
: undef, |
|
437 |
: undef,
|
|
438 | 438 |
only_if => $form->{type} eq "invoice_for_advance_payment", |
439 | 439 |
], |
440 | 440 |
action => [ |
441 | 441 |
t8('Final Invoice'), |
442 | 442 |
submit => [ '#form', { action => "final_invoice" } ], |
443 | 443 |
checks => [ 'kivi.validate_form' ], |
444 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
|
445 |
: !$form->{id} ? t8('This invoice has not been posted yet.') |
|
446 |
: $has_further_invoice_for_advance_payment ? t8('This invoice has a further invoice for advanced payment.') |
|
447 |
: $has_final_invoice ? t8('This invoice has already a final invoice.') |
|
444 |
disabled => !$may_edit_create ? t8('You must not change this invoice.')
|
|
445 |
: !$form->{id} ? t8('This invoice has not been posted yet.')
|
|
446 |
: $has_further_invoice_for_advance_payment ? t8('This invoice has a further invoice for advanced payment.')
|
|
447 |
: $has_final_invoice ? t8('This invoice has already a final invoice.')
|
|
448 | 448 |
: $is_invoice_for_advance_payment_from_order ? t8('This invoice was added from an order. See there.') |
449 |
: undef, |
|
449 |
: undef,
|
|
450 | 450 |
only_if => $form->{type} eq "invoice_for_advance_payment", |
451 | 451 |
], |
452 | 452 |
action => [ |
... | ... | |
615 | 615 |
} |
616 | 616 |
|
617 | 617 |
$TMPL_VAR{is_type_invoice_for_advance_payment} = $form->{type} eq "invoice_for_advance_payment"; |
618 |
$TMPL_VAR{is_type_credit_note} = $form->{type} eq "credit_note"; |
|
619 |
$TMPL_VAR{is_format_html} = $form->{format} eq 'html'; |
|
620 |
$TMPL_VAR{dateformat} = $myconfig{dateformat}; |
|
621 |
$TMPL_VAR{numberformat} = $myconfig{numberformat}; |
|
618 |
$TMPL_VAR{is_type_credit_note} = $form->{type} eq "credit_note";
|
|
619 |
$TMPL_VAR{is_format_html} = $form->{format} eq 'html';
|
|
620 |
$TMPL_VAR{dateformat} = $myconfig{dateformat};
|
|
621 |
$TMPL_VAR{numberformat} = $myconfig{numberformat};
|
|
622 | 622 |
|
623 | 623 |
# hiddens |
624 | 624 |
$TMPL_VAR{HIDDENS} = [qw( |
... | ... | |
759 | 759 |
|
760 | 760 |
print $form->parse_html_template('is/form_footer', { |
761 | 761 |
is_type_invoice_for_advance_payment => ($form->{type} eq "invoice_for_advance_payment"), |
762 |
is_type_credit_note => ($form->{type} eq "credit_note"), |
|
763 |
totalpaid => $totalpaid, |
|
764 |
paid_missing => $form->{invtotal} - $totalpaid, |
|
765 |
print_options => setup_sales_purchase_print_options(), |
|
766 |
show_storno => $form->{id} && !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ar") && !$totalpaid, |
|
767 |
show_delete => ($::instance_conf->get_is_changeable == 2) |
|
768 |
? ($form->current_date(\%myconfig) eq $form->{gldate}) |
|
769 |
: ($::instance_conf->get_is_changeable == 1), |
|
770 |
today => DateTime->today, |
|
771 |
vc_obj => $form->{customer_id} ? SL::DB::Customer->load_cached($form->{customer_id}) : undef, |
|
772 |
shipto_cvars => $shipto_cvars, |
|
762 |
is_type_credit_note => ($form->{type} eq "credit_note"),
|
|
763 |
totalpaid => $totalpaid,
|
|
764 |
paid_missing => $form->{invtotal} - $totalpaid,
|
|
765 |
print_options => setup_sales_purchase_print_options(),
|
|
766 |
show_storno => $form->{id} && !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ar") && !$totalpaid,
|
|
767 |
show_delete => ($::instance_conf->get_is_changeable == 2)
|
|
768 |
? ($form->current_date(\%myconfig) eq $form->{gldate})
|
|
769 |
: ($::instance_conf->get_is_changeable == 1),
|
|
770 |
today => DateTime->today,
|
|
771 |
vc_obj => $form->{customer_id} ? SL::DB::Customer->load_cached($form->{customer_id}) : undef,
|
|
772 |
shipto_cvars => $shipto_cvars,
|
|
773 | 773 |
}); |
774 | 774 |
##print $form->parse_html_template('is/_payments'); # parser |
775 | 775 |
##print $form->parse_html_template('webdav/_list'); # parser |
Auch abrufbar als: Unified diff
Anzahlungs-Rg.: Kosmetik: Einrückung/Ausrichtung