Revision 89ac3ab1
Von Sven Schöling vor fast 8 Jahren hinzugefügt
bin/mozilla/do.pl | ||
---|---|---|
309 | 309 |
|
310 | 310 |
$::form->{HIDDENS} = [ map { +{ name => $_, value => $::form->{$_} } } (@custom_hidden) ]; |
311 | 311 |
|
312 |
my @transfer_qty = qw(kivi.SalesPurchase.delivery_order_check_transfer_qty); |
|
313 |
my @req_trans_desc = qw(kivi.SalesPurchase.check_transaction_description) x!!$::instance_conf->get_require_transaction_description_ps; |
|
314 |
|
|
315 |
for my $bar ($::request->layout->get('actionbar')) { |
|
316 |
$bar->add_actions([ t8('Update'), |
|
317 |
submit => [ '#form', { action_update => 1 } ], |
|
318 |
]); |
|
319 |
$bar->add_actions("combobox"); |
|
320 |
$bar->actions->[-1]->add_actions([ t8('Save'), |
|
321 |
submit => [ '#form', { action_save => 1 } ], |
|
322 |
checks => [ @req_trans_desc ], |
|
323 |
disabled => $::form->{delivered}, |
|
324 |
]); |
|
325 |
$bar->actions->[-1]->add_actions([ t8('Save as new'), |
|
326 |
submit => [ '#form', { action_save_as_new => 1 } ], |
|
327 |
checks => [ @req_trans_desc ], |
|
328 |
disabled => !$::form->{id}, |
|
329 |
]); |
|
330 |
$bar->actions->[-1]->add_actions([ t8('mark as paid'), |
|
331 |
submit => [ '#form', { action_mark_closed => 1 } ], |
|
332 |
checks => [ @req_trans_desc ], |
|
333 |
confirm => t8('This will remove the delivery order from showing as open even if contents are not delivered. Proceed?'), |
|
334 |
disabled => !$::form->{id} || $::form->{closed}, |
|
335 |
]); |
|
336 |
$bar->add_actions([ t8('Delete'), |
|
337 |
submit => [ '#form', { action_delete => 1 } ], |
|
338 |
confirm => t8('Do you really want to delete this object?'), |
|
339 |
disabled => !$::form->{id} || $::form->{delivered} |
|
340 |
|| ($::form->{vc} eq 'customer' && !$::instance_conf->get_sales_delivery_order_show_delete) |
|
341 |
|| ($::form->{vc} eq 'vendor' && !$::instance_conf->get_purchase_delivery_order_show_delete), |
|
342 |
]); |
|
343 |
$bar->add_actions("combobox"); |
|
344 |
$bar->actions->[-1]->add_actions([ t8('Transfer out'), |
|
345 |
submit => [ '#form', { action_transfer_out => 1 } ], |
|
346 |
checks => [ @req_trans_desc, @transfer_qty ], |
|
347 |
disabled => $::form->{delivered}, |
|
348 |
]) if $::form->{vc} eq 'customer'; |
|
349 |
$bar->actions->[-1]->add_actions([ t8('Transfer out via default'), |
|
350 |
submit => [ '#form', { action_transfer_out_default => 1 } ], |
|
351 |
checks => [ @req_trans_desc, @transfer_qty ], |
|
352 |
disabled => $::form->{delivered}, |
|
353 |
]) if $::form->{vc} eq 'customer' && $::instance_conf->get_transfer_default; |
|
354 |
$bar->actions->[-1]->add_actions([ t8('Transfer in'), |
|
355 |
submit => [ '#form', { action_transfer_in => 1 } ], |
|
356 |
checks => [ @req_trans_desc, @transfer_qty ], |
|
357 |
disabled => $::form->{delivered}, |
|
358 |
]) if $::form->{vc} eq 'vendor'; |
|
359 |
$bar->actions->[-1]->add_actions([ t8('Transfer in via default'), |
|
360 |
submit => [ '#form', { action_transfer_in_default => 1 } ], |
|
361 |
checks => [ @req_trans_desc, @transfer_qty ], |
|
362 |
disabled => $::form->{delivered}, |
|
363 |
]) if $::form->{vc} eq 'vendor' && $::instance_conf->get_transfer_default; |
|
364 |
|
|
365 |
$bar->add_actions("separator"); |
|
366 |
$bar->add_actions([ t8('Invoice'), |
|
367 |
submit => [ '#form', { action_invoice => 1 } ], |
|
368 |
disabled => !$::form->{id}, |
|
369 |
]); |
|
370 |
$bar->add_actions('combobox'); |
|
371 |
$bar->actions->[-1]->add_actions([ t8('Export'), |
|
372 |
disabled => 1, |
|
373 |
]); |
|
374 |
$bar->actions->[-1]->add_actions([ t8('Print'), |
|
375 |
submit => [ '#form', { action_print => 1 } ], |
|
376 |
checks => [ @req_trans_desc ], |
|
377 |
]); |
|
378 |
$bar->actions->[-1]->add_actions([ t8('E Mail'), |
|
379 |
submit => [ '#form', { action_print => 1 } ], |
|
380 |
checks => [ @req_trans_desc ], |
|
381 |
]); |
|
382 |
$bar->add_actions('combobox'); |
|
383 |
$bar->actions->[-1]->add_actions([ t8('more'), |
|
384 |
disabled => 1, |
|
385 |
]); |
|
386 |
$bar->actions->[-1]->add_actions([ t8('History'), |
|
387 |
call => [ 'set_history_window', $::form->{id} * 1, 'id' ], |
|
388 |
disabled => !$::form->{id}, |
|
389 |
]); |
|
390 |
$bar->actions->[-1]->add_actions([ t8('Follow-Up'), |
|
391 |
call => [ 'follow_up_window' ], |
|
392 |
disabled => !$::form->{id}, |
|
393 |
]); |
|
394 |
} |
|
395 |
|
|
312 | 396 |
$form->header(); |
313 | 397 |
# Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID' |
314 | 398 |
# und Erweiterung für Bug 1760: |
templates/webpages/do/form_footer.html | ||
---|---|---|
66 | 66 |
|
67 | 67 |
<p>[% PRINT_OPTIONS %]</p> |
68 | 68 |
|
69 |
<p> |
|
70 |
[% 'Edit the Delivery Order' | $T8 %]<br> |
|
71 | 69 |
<input type="hidden" name="action" value="dispatcher"> |
72 |
<input class="submit" type="submit" name="action_update" id="update_button" value="[% 'Update' | $T8 %]"> |
|
73 |
[%- UNLESS delivered %] |
|
74 |
[%- IF vc == 'customer' %] |
|
75 |
<input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]"> |
|
76 |
[%- END %] |
|
77 |
[%- END %] |
|
78 |
<input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]"> |
|
79 |
<input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]"> |
|
80 |
[%- UNLESS delivered %] |
|
81 |
<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]"> |
|
82 |
[%- IF vc == 'customer' %] |
|
83 |
<input class="submit" type="submit" name="action_transfer_out" value="[% 'Transfer out' | $T8 %]" data-check-transfer-qty="1" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]"> |
|
84 |
[% IF transfer_default %] |
|
85 |
<input class="submit" type="submit" name="action_transfer_out_default" value="[% 'Transfer out via default' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]"> |
|
86 |
[%- END %] |
|
87 |
[%- ELSE %] |
|
88 |
<input class="submit" type="submit" name="action_transfer_in" value="[% 'Transfer in' | $T8 %]" data-check-transfer-qty="1" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]"> |
|
89 |
[% IF transfer_default %] |
|
90 |
<input class="submit" type="submit" name="action_transfer_in_default" value="[% 'Transfer in via default' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]"> |
|
91 |
[%- END %] |
|
92 |
[%- END %] |
|
93 |
[%- END %] |
|
94 |
[%- IF id %] |
|
95 |
<input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]"> |
|
96 |
[%- UNLESS closed %] |
|
97 |
<input class="submit" type="submit" name="action_mark_closed" value="[% 'Mark closed' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]"> |
|
98 |
[%- END %] |
|
99 |
<input type="button" class="submit" onclick="set_history_window([% id %], 'id');" name="history" id="history" value="[% 'history' | $T8 %]"> |
|
100 |
[%- END %] |
|
101 |
</p> |
|
102 |
|
|
103 |
[%- IF id %] |
|
104 |
<p> |
|
105 |
[% 'Workflow Delivery Order' | $T8 %]<br> |
|
106 |
<input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]"> |
|
107 |
[% UNLESS delivered || (vc == 'customer' && !INSTANCE_CONF.get_sales_delivery_order_show_delete) || (vc == 'vendor' && !INSTANCE_CONF.get_purchase_delivery_order_show_delete) %] |
|
108 |
[% L.submit_tag('action_delete', LxERP.t8('Delete'), confirm=LxERP.t8('Are you sure?')) %] |
|
109 |
[% END %] |
|
110 |
<input class="submit" type="submit" name="action_invoice" value="[% 'Invoice' | $T8 %]"> |
|
111 |
</p> |
|
112 |
[%- END %] |
|
113 | 70 |
|
114 | 71 |
<input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]"> |
115 | 72 |
<input name="callback" type="hidden" value="[% HTML.escape(callback) %]"> |
templates/webpages/do/form_header.html | ||
---|---|---|
37 | 37 |
<p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p> |
38 | 38 |
[%- END %] |
39 | 39 |
|
40 |
<form method="post" name="do" action="do.pl"> |
|
40 |
<form id="form" method="post" name="do" action="do.pl">
|
|
41 | 41 |
|
42 | 42 |
<div id="do_tabs" class="tabwidget"> |
43 | 43 |
<ul> |
... | ... | |
162 | 162 |
[%- ELSE %] |
163 | 163 |
[% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ; |
164 | 164 |
L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %] |
165 |
[% L.submit_tag('action_ship_to', LxERP.t8('Ship to')) %] |
|
165 | 166 |
[%- END %] |
166 | 167 |
</td> |
167 | 168 |
</tr> |
Auch abrufbar als: Unified diff
actionbar: do