Revision 00402ae6
Von Bernd Bleßmann vor mehr als 6 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
1435 | 1435 |
} } @all_objects; |
1436 | 1436 |
} |
1437 | 1437 |
|
1438 |
$::request->{layout}->use_javascript("${_}.js") for qw(kivi.SalesPurchase kivi.Order kivi.File ckeditor/ckeditor ckeditor/adapters/jquery edit_periodic_invoices_config); |
|
1438 |
$::request->{layout}->use_javascript("${_}.js") for qw(kivi.SalesPurchase kivi.Order kivi.File ckeditor/ckeditor ckeditor/adapters/jquery edit_periodic_invoices_config calculate_qty);
|
|
1439 | 1439 |
$self->_setup_edit_action_bar; |
1440 | 1440 |
} |
1441 | 1441 |
|
bin/mozilla/io.pl | ||
---|---|---|
319 | 319 |
my $qty_dec = ($form->{"qty_$i"} =~ /\.(\d+)/) ? length $1 : 2; |
320 | 320 |
|
321 | 321 |
$column_data{qty} = $cgi->textfield(-name => "qty_$i", -size => 5, -class => "numeric", -value => $form->format_amount(\%myconfig, $form->{"qty_$i"}, $qty_dec)); |
322 |
$column_data{qty} .= $cgi->button(-onclick => "calculate_qty_selection_window('qty_$i', '', 'formel_$i')", -value => $locale->text('*/')) |
|
322 |
$column_data{qty} .= $cgi->button(-onclick => "calculate_qty_selection_window('qty_$i', '', 'formel_$i', '')", -value => $locale->text('*/'))
|
|
323 | 323 |
. $cgi->hidden(-name => "formel_$i", -value => $form->{"formel_$i"}) |
324 | 324 |
if $form->{"formel_$i"}; |
325 | 325 |
|
js/kivi.Order.js | ||
---|---|---|
623 | 623 |
return true; |
624 | 624 |
}; |
625 | 625 |
|
626 |
ns.show_calculate_qty_dialog = function(clicked) { |
|
627 |
var row = $(clicked).parents("tbody").first(); |
|
628 |
var input_id = $(row).find('[name="order.orderitems[].qty_as_number"]').attr('id'); |
|
629 |
var formula_id = $(row).find('[name="formula"]').attr('id'); |
|
630 |
|
|
631 |
calculate_qty_selection_window("", input_id, "", formula_id); |
|
632 |
return true; |
|
633 |
} |
|
634 |
|
|
626 | 635 |
}); |
627 | 636 |
|
628 | 637 |
$(function(){ |
templates/webpages/order/tabs/_row.html | ||
---|---|---|
48 | 48 |
[%- END -%] |
49 | 49 |
[%- L.button_tag("kivi.Order.show_longdescription_dialog(this)", LxERP.t8("L")) %] |
50 | 50 |
</td> |
51 |
<td> |
|
51 |
<td nowrap>
|
|
52 | 52 |
[%- L.input_tag("order.orderitems[].qty_as_number", |
53 | 53 |
ITEM.qty_as_number, |
54 | 54 |
size = 5, |
55 | 55 |
class="recalc reformat_number numeric") %] |
56 |
[%- IF ITEM.part.formel -%] |
|
57 |
[%- L.button_tag("kivi.Order.show_calculate_qty_dialog(this)", LxERP.t8("*/")) %] |
|
58 |
[%- L.hidden_tag("formula", ITEM.part.formel) -%] |
|
59 |
[%- END -%] |
|
56 | 60 |
</td> |
57 | 61 |
<td> |
58 | 62 |
[%- L.select_tag("order.orderitems[].price_factor_id", |
Auch abrufbar als: Unified diff
Auftrags-Controller: Formelberechnung
Sollte evtl. auf Dialog umgestellt werden.