Anzeigekonfiguration von Gewichten
Gewichte in Druckvorlagen
Durch diesen Commit werden
1. unnötige Hidden-Variablen aus html-templates entfernt, die mit
Gewichten zu tun haben.
2. die Anzeige von Gewichten konfigurierbar gemacht.
3. Gewichte in Druckvorlagen zur Verfügung gestellt. Es stehen ein
Zeilengewicht (lineweight), Einzelgewicht des Artikels (weight) und
Gesamtgewicht (totalweight) zur Verfügung, die letzten beiden auch
als unformatierte Variablen (weight_nofmt und totalweight_nofmt).
12 files changed:
map { $self->{$_} = SL::DB::Default->get->$_ } qw(sales_order_show_delete purchase_order_show_delete sales_delivery_order_show_delete purchase_delivery_order_show_delete);
map { $self->{$_} = SL::DB::Default->get->$_ } qw(sales_order_show_delete purchase_order_show_delete sales_delivery_order_show_delete purchase_delivery_order_show_delete);
+ $self->{show_weight} = SL::DB::Default->get->show_weight;
+
$self->render('client_config/form', title => $::locale->text('Client Configuration'));
}
$self->render('client_config/form', title => $::locale->text('Client Configuration'));
}
map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(sales_order_show_delete purchase_order_show_delete sales_delivery_order_show_delete purchase_delivery_order_show_delete);
map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(sales_order_show_delete purchase_order_show_delete sales_delivery_order_show_delete purchase_delivery_order_show_delete);
+ SL::DB::Default->get->update_attributes('show_weight' => $::form->{show_weight});
+
flash_later('info', $::locale->text('Client Configuration saved!'));
$self->redirect_to(action => 'edit');
flash_later('info', $::locale->text('Client Configuration saved!'));
$self->redirect_to(action => 'edit');
ar_show_mark_as_paid => { type => 'boolean', default => 'true' },
ap_show_mark_as_paid => { type => 'boolean', default => 'true' },
assemblynumber => { type => 'text' },
ar_show_mark_as_paid => { type => 'boolean', default => 'true' },
ap_show_mark_as_paid => { type => 'boolean', default => 'true' },
assemblynumber => { type => 'text' },
+ show_weight => { type => 'boolean', default => 'false', not_null => 1 },
],
primary_key_columns => [ 'id' ],
],
primary_key_columns => [ 'id' ],
$form->{totalweight} = $form->format_amount($myconfig, $totalweight, 3);
$form->{totalweight_nofmt} = $totalweight;
$form->{totalweight} = $form->format_amount($myconfig, $totalweight, 3);
$form->{totalweight_nofmt} = $totalweight;
+ my $defaults = AM->get_defaults();
+ $form->{weightunit} = $defaults->{weightunit};
$h_pg->finish();
$h_bin_wh->finish();
$h_pg->finish();
$h_bin_wh->finish();
$form->{totalweight} = $form->format_amount($myconfig, $totalweight, 3);
$form->{totalweight_nofmt} = $totalweight;
$form->{totalweight} = $form->format_amount($myconfig, $totalweight, 3);
$form->{totalweight_nofmt} = $totalweight;
+ my $defaults = AM->get_defaults();
+ $form->{weightunit} = $defaults->{weightunit};
foreach my $item (sort keys %taxaccounts) {
$tax += $taxamount = $form->round_amount($taxaccounts{$item}, 2);
foreach my $item (sort keys %taxaccounts) {
$tax += $taxamount = $form->round_amount($taxaccounts{$item}, 2);
$form->{totalweight} = $form->format_amount($myconfig, $totalweight, 3);
$form->{totalweight_nofmt} = $totalweight;
$form->{totalweight} = $form->format_amount($myconfig, $totalweight, 3);
$form->{totalweight_nofmt} = $totalweight;
+ my $defaults = AM->get_defaults();
+ $form->{weightunit} = $defaults->{weightunit};
my $tax = 0;
foreach $item (sort keys %taxaccounts) {
my $tax = 0;
foreach $item (sort keys %taxaccounts) {
my ($stock_in_out, $stock_in_out_title);
my ($stock_in_out, $stock_in_out_title);
+ my $defaults = AM->get_defaults();
+ $form->{show_weight} = $defaults->{show_weight};
+ $form->{weightunit} = $defaults->{weightunit};
+
my $is_purchase = (first { $_ eq $form->{type} } qw(request_quotation purchase_order purchase_delivery_order)) || ($form->{script} eq 'ir.pl');
my $show_min_order_qty = first { $_ eq $form->{type} } qw(request_quotation purchase_order);
my $is_delivery_order = $form->{type} =~ /_delivery_order$/;
my $is_purchase = (first { $_ eq $form->{type} } qw(request_quotation purchase_order purchase_delivery_order)) || ($form->{script} eq 'ir.pl');
my $show_min_order_qty = first { $_ eq $form->{type} } qw(request_quotation purchase_order);
my $is_delivery_order = $form->{type} =~ /_delivery_order$/;
{ id => 'qty', width => 5, value => $locale->text('Qty'), display => 1, },
{ id => 'price_factor', width => 5, value => $locale->text('Price Factor'), display => !$is_delivery_order, },
{ id => 'unit', width => 5, value => $locale->text('Unit'), display => 1, },
{ id => 'qty', width => 5, value => $locale->text('Qty'), display => 1, },
{ id => 'price_factor', width => 5, value => $locale->text('Price Factor'), display => !$is_delivery_order, },
{ id => 'unit', width => 5, value => $locale->text('Unit'), display => 1, },
- { id => 'weight', width => 5, value => $locale->text('Weight'), display => 1, },
+ { id => 'weight', width => 5, value => $locale->text('Weight'), display => $defaults->{show_weight}, },
{ id => 'serialnr', width => 10, value => $locale->text('Serial No.'), display => 0, },
{ id => 'projectnr', width => 10, value => $locale->text('Project'), display => 0, },
{ id => 'sellprice', width => 15, value => $locale->text('Price'), display => !$is_delivery_order, },
{ id => 'serialnr', width => 10, value => $locale->text('Serial No.'), display => 0, },
{ id => 'projectnr', width => 10, value => $locale->text('Project'), display => 0, },
{ id => 'sellprice', width => 15, value => $locale->text('Price'), display => !$is_delivery_order, },
_update_custom_variables();
my $totalweight = 0;
_update_custom_variables();
my $totalweight = 0;
- my $defaults = AM->get_defaults();
- $form->{weightunit} = $defaults->{weightunit};
$column_data{linetotal} = $form->format_amount(\%myconfig, $linetotal, 2);
$column_data{bin} = $form->{"bin_$i"};
$column_data{linetotal} = $form->format_amount(\%myconfig, $linetotal, 2);
$column_data{bin} = $form->{"bin_$i"};
- $column_data{weight} = $form->format_amount(\%myconfig, $form->{"qty_$i"} * $form->{"weight_$i"}, 3) . ' ' . $defaults->{weightunit};
- #To add the hidden variable lineweight:
- $form->{"lineweight_$i"} = $column_data{weight};
+ $column_data{weight} = $form->format_amount(\%myconfig, $form->{"qty_$i"} * $form->{"weight_$i"}, 3) . ' ' . $defaults->{weightunit} if $defaults->{show_weight};
if ($is_delivery_order) {
$column_data{stock_in_out} = calculate_stock_in_out($i);
if ($is_delivery_order) {
$column_data{stock_in_out} = calculate_stock_in_out($i);
map { ($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } map { $_."_$i" }
(qw(orderitems_id bo pricegroup_old price_old id inventory_accno bin partsgroup partnotes
income_accno expense_accno listprice assembly taxaccounts ordnumber transdate cusordnumber
map { ($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } map { $_."_$i" }
(qw(orderitems_id bo pricegroup_old price_old id inventory_accno bin partsgroup partnotes
income_accno expense_accno listprice assembly taxaccounts ordnumber transdate cusordnumber
- longdescription basefactor marge_absolut marge_percent marge_price_factor weight lineweight), @hidden_vars)
+ longdescription basefactor marge_absolut marge_percent marge_price_factor weight), @hidden_vars)
);
map { $form->{"${_}_base"} += $linetotal } (split(/ /, $form->{"taxaccounts_$i"}));
);
map { $form->{"${_}_base"} += $linetotal } (split(/ /, $form->{"taxaccounts_$i"}));
'Show old dunnings' => 'Alte Mahnungen anzeigen',
'Show overdue sales quotations and requests for quotations...' => 'Überfällige Angebote und Preisanfragen anzeigen...',
'Show settings' => 'Einstellungen anzeigen',
'Show old dunnings' => 'Alte Mahnungen anzeigen',
'Show overdue sales quotations and requests for quotations...' => 'Überfällige Angebote und Preisanfragen anzeigen...',
'Show settings' => 'Einstellungen anzeigen',
+ 'Show the weights of articles and the total weight in orders, invoices and delivery notes?' => 'Sollen Warengewichte und Gesamtgewicht in Aufträgen, Rechnungen und Lieferscheinen angezeigt werden?',
+ 'Show weights' => 'Gewichte anzeigen',
'Show your TODO list after loggin in' => 'Aufgabenliste nach dem Anmelden anzeigen',
'Signature' => 'Unterschrift',
'Since bin is not enforced in the parts data, please specify a bin where goods without a specified bin will be put.' => 'Da Lagerplätze kein Pflichtfeld sind, geben Sie bitte einen Lagerplatz an, in dem Waren ohne spezifizierten Lagerplatz eingelagert werden sollen.',
'Show your TODO list after loggin in' => 'Aufgabenliste nach dem Anmelden anzeigen',
'Signature' => 'Unterschrift',
'Since bin is not enforced in the parts data, please specify a bin where goods without a specified bin will be put.' => 'Da Lagerplätze kein Pflichtfeld sind, geben Sie bitte einen Lagerplatz an, in dem Waren ohne spezifizierten Lagerplatz eingelagert werden sollen.',
+ <tr class='listheading'>
+ <th colspan="3">[% 'Weight' | $T8 %]</th>
+ </tr>
+ <tr>
+ <td align="right">[% 'Show weights' | $T8 %]</td>
+ <td>
+ [% L.yes_no_tag('show_weight', SELF.show_weight) %]
+ </td>
+ <td>
+ [% 'Show the weights of articles and the total weight in orders, invoices and delivery notes?' | $T8 %]<br>
+ </td>
+ </tr>
<tr>
<td>
<table width="100%">
<tr>
<td>
<table width="100%">
<th align="left">[% 'Total weight' | $T8 %]</th>
<td align="right">
[% LxERP.format_amount(totalweight, 3) %] [% HTML.escape(weightunit) %]
<th align="left">[% 'Total weight' | $T8 %]</th>
<td align="right">
[% LxERP.format_amount(totalweight, 3) %] [% HTML.escape(weightunit) %]
- <input type="hidden" name="totalweight" value="[% HTML.escape(totalweight) %]">
[%- END %]
</table>
</td>
[%- END %]
</table>
</td>
<td>
<table>
<tr>
<th align=left>[% 'Total weight' | $T8 %]</th>
<td>
[% LxERP.format_amount(totalweight) %] [% HTML.escape(weightunit) %]
<td>
<table>
<tr>
<th align=left>[% 'Total weight' | $T8 %]</th>
<td>
[% LxERP.format_amount(totalweight) %] [% HTML.escape(weightunit) %]
- <input type=hidden name="totalweight" value="[% totalweight %]">
- <input type=hidden name="weightunit" value="[% HTML.escape(weightunit) %]">
</td>
</tr>
</table>
</td>
</td>
</tr>
</table>
</td>
<td align="right">
[%- IF taxaccounts %]
<input name="taxincluded" class="checkbox" type="checkbox" [% IF taxincluded %]checked[% END %]>
<td align="right">
[%- IF taxaccounts %]
<input name="taxincluded" class="checkbox" type="checkbox" [% IF taxincluded %]checked[% END %]>
[%- END %]
</table>
</td>
[%- END %]
</table>
</td>
<td>
<table>
<tr>
<th align=left>[% 'Total weight' | $T8 %]</th>
<td>
[% LxERP.format_amount(totalweight) %] [% HTML.escape(weightunit) %]
<td>
<table>
<tr>
<th align=left>[% 'Total weight' | $T8 %]</th>
<td>
[% LxERP.format_amount(totalweight) %] [% HTML.escape(weightunit) %]
- <input type=hidden name="totalweight" value="[% totalweight %]">
- <input type=hidden name="weightunit" value="[% HTML.escape(weightunit) %]">
</td>
</tr>
</table>
</td>
</td>
</tr>
</table>
</td>
[%- END %]
</table>
</td>
[%- END %]
</table>
</td>
<td>
<table>
<tr>
<th align="left">[% 'Total weight' | $T8 %]</th>
<td align="right">
[% LxERP.format_amount(totalweight, 3) %] [% HTML.escape(weightunit) %]
<td>
<table>
<tr>
<th align="left">[% 'Total weight' | $T8 %]</th>
<td align="right">
[% LxERP.format_amount(totalweight, 3) %] [% HTML.escape(weightunit) %]
- <input type=hidden name="totalweight" value="[% totalweight %]">
- <input type="hidden" name="weightunit" value="[% HTML.escape(weightunit) %]">
</td>
</tr>
</table>
</td>
</td>
</tr>
</table>
</td>
[%- IF is_sales %]
<td>
<table>
[%- IF is_sales %]
<td>
<table>