Revision d707f7ac
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
53 | 53 |
use SL::Template; |
54 | 54 |
use SL::User; |
55 | 55 |
use Template; |
56 |
use List::Util qw(max min sum); |
|
56 |
use List::Util qw(first max min sum);
|
|
57 | 57 |
|
58 | 58 |
my $standard_dbh; |
59 | 59 |
|
... | ... | |
1257 | 1257 |
$formname ||= $self->{formname}; |
1258 | 1258 |
|
1259 | 1259 |
my %formname_translations = ( |
1260 |
bin_list => $main::locale->text('Bin List'), |
|
1261 |
credit_note => $main::locale->text('Credit Note'), |
|
1262 |
invoice => $main::locale->text('Invoice'), |
|
1263 |
packing_list => $main::locale->text('Packing List'), |
|
1264 |
pick_list => $main::locale->text('Pick List'), |
|
1265 |
proforma => $main::locale->text('Proforma Invoice'), |
|
1266 |
purchase_order => $main::locale->text('Purchase Order'), |
|
1267 |
request_quotation => $main::locale->text('RFQ'), |
|
1268 |
sales_order => $main::locale->text('Confirmation'), |
|
1269 |
sales_quotation => $main::locale->text('Quotation'), |
|
1270 |
storno_invoice => $main::locale->text('Storno Invoice'), |
|
1271 |
storno_packing_list => $main::locale->text('Storno Packing List'), |
|
1260 |
bin_list => $main::locale->text('Bin List'), |
|
1261 |
credit_note => $main::locale->text('Credit Note'), |
|
1262 |
invoice => $main::locale->text('Invoice'), |
|
1263 |
packing_list => $main::locale->text('Packing List'), |
|
1264 |
pick_list => $main::locale->text('Pick List'), |
|
1265 |
proforma => $main::locale->text('Proforma Invoice'), |
|
1266 |
purchase_order => $main::locale->text('Purchase Order'), |
|
1267 |
request_quotation => $main::locale->text('RFQ'), |
|
1268 |
sales_order => $main::locale->text('Confirmation'), |
|
1269 |
sales_quotation => $main::locale->text('Quotation'), |
|
1270 |
storno_invoice => $main::locale->text('Storno Invoice'), |
|
1271 |
storno_packing_list => $main::locale->text('Storno Packing List'), |
|
1272 |
sales_delivery_order => $main::locale->text('Delivery Order'), |
|
1273 |
purchase_delivery_order => $main::locale->text('Delivery Order'), |
|
1272 | 1274 |
); |
1273 | 1275 |
|
1274 | 1276 |
return $formname_translations{$formname} |
... | ... | |
1278 | 1280 |
my ($self) = @_; |
1279 | 1281 |
|
1280 | 1282 |
my $attachment_filename = $self->unquote_html($self->get_formname_translation()); |
1281 |
my $prefix = |
|
1282 |
(grep { $self->{"type"} eq $_ } qw(invoice credit_note)) ? "inv" |
|
1283 |
: ($self->{"type"} =~ /_quotation$/) ? "quo" |
|
1284 |
: "ord"; |
|
1283 |
my $prefix = |
|
1284 |
(first { $self->{type} eq $_ } qw(invoice credit_note)) ? 'inv' |
|
1285 |
: ($self->{type} =~ /_quotation$/) ? 'quo' |
|
1286 |
: ($self->{type} =~ /_delivery_order$/) ? 'do' |
|
1287 |
: 'ord'; |
|
1285 | 1288 |
|
1286 | 1289 |
if ($attachment_filename && $self->{"${prefix}number"}) { |
1287 | 1290 |
$attachment_filename .= "_" . $self->{"${prefix}number"} |
Auch abrufbar als: Unified diff
Lieferscheine im Einkauf und Verkauf. Bisher nur gemerget, noch nicht getestet.