- |.$locale->text('Include in Report').qq| |
+ | . $locale->text('Include in Report') . qq| |
|
@@ -1106,7 +1531,8 @@ $jsscript
{vc}>
{type}>
-
+
@@ -1116,115 +1542,152 @@ $jsscript
$lxdebug->leave_sub();
}
-
sub orders {
$lxdebug->enter_sub();
# split vendor / customer
- ($form->{$form->{vc}}, $form->{"$form->{vc}_id"}) = split(/--/, $form->{$form->{vc}});
+ ($form->{ $form->{vc} }, $form->{"$form->{vc}_id"}) =
+ split(/--/, $form->{ $form->{vc} });
OE->transactions(\%myconfig, \%$form);
$ordnumber = ($form->{type} =~ /_order$/) ? "ordnumber" : "quonumber";
- $number = $form->escape($form->{$ordnumber});
- $name = $form->escape($form->{$form->{vc}});
+ $number = $form->escape($form->{$ordnumber});
+ $name = $form->escape($form->{ $form->{vc} });
$department = $form->escape($form->{department});
- $warehouse = $form->escape($form->{warehouse});
-
+
# construct href
- $href = "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}&$ordnumber=$number&$form->{vc}=$name&department=$department&warehouse=$warehouse";
+ $href =
+ "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}¬delivered=$form->{notdelivered}&delivered=$form->{delivered}&$ordnumber=$number&$form->{vc}=$name&department=$department";
# construct callback
- $number = $form->escape($form->{$ordnumber},1);
- $name = $form->escape($form->{$form->{vc}},1);
- $department = $form->escape($form->{department},1);
- $warehouse = $form->escape($form->{warehouse},1);
-
- $callback = "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}&$ordnumber=$number&$form->{vc}=$name&department=$department&warehouse=$warehouse";
+ $number = $form->escape($form->{$ordnumber}, 1);
+ $name = $form->escape($form->{ $form->{vc} }, 1);
+ $department = $form->escape($form->{department}, 1);
+
+ $callback =
+ "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}¬delivered=$form->{notdelivered}&delivered=$form->{delivered}&$ordnumber=$number&$form->{vc}=$name&department=$department";
- @columns = $form->sort_columns("transdate", "reqdate", "id", "$ordnumber", "name", "netamount", "tax", "amount", "curr", "employee", "shipvia", "open", "closed");
+ @columns =
+ $form->sort_columns("transdate", "reqdate", "id", "$ordnumber",
+ "name", "netamount", "tax", "amount",
+ "curr", "employee", "shipvia", "globalprojectnumber",
+ "open", "closed", "delivered");
- $form->{l_open} = $form->{l_closed} = "Y" if ($form->{open} && $form->{closed}) ;
+ $form->{l_open} = $form->{l_closed} = "Y"
+ if ($form->{open} && $form->{closed});
+
+ $form->{"l_delivered"} = "Y"
+ if ($form->{"delivered"} && $form->{"notdelivered"});
foreach $item (@columns) {
if ($form->{"l_$item"} eq "Y") {
push @column_index, $item;
-
+
# add column to href and callback
$callback .= "&l_$item=Y";
- $href .= "&l_$item=Y";
+ $href .= "&l_$item=Y";
}
}
-
+
+ # only show checkboxes if gotten here via sales_order form.
+ if ($form->{type} =~ /sales_order/) {
+ unshift @column_index, "ids";
+ }
+
if ($form->{l_subtotal} eq 'Y') {
$callback .= "&l_subtotal=Y";
- $href .= "&l_subtotal=Y";
+ $href .= "&l_subtotal=Y";
}
-
-
+
if ($form->{vc} eq 'vendor') {
- if ($form->{type} eq 'receive_order') {
- $form->{title} = $locale->text('Receive Merchandise');
- } elsif ($form->{type} eq 'purchase_order') {
+ if ($form->{type} eq 'purchase_order') {
$form->{title} = $locale->text('Purchase Orders');
} else {
$form->{title} = $locale->text('Request for Quotations');
}
- $name = $locale->text('Vendor');
+ $name = $locale->text('Vendor');
$employee = $locale->text('Employee');
}
if ($form->{vc} eq 'customer') {
if ($form->{type} eq 'sales_order') {
$form->{title} = $locale->text('Sales Orders');
- $employee = $locale->text('Salesperson');
- } elsif ($form->{type} eq 'ship_order') {
- $form->{title} = $locale->text('Ship Merchandise');
- $employee = $locale->text('Salesperson');
} else {
$form->{title} = $locale->text('Quotations');
- $employee = $locale->text('Employee');
}
+ $employee = $locale->text('Employee');
$name = $locale->text('Customer');
}
-
- $column_header{id} = qq||.$locale->text('ID').qq| | |;
- $column_header{transdate} = qq||.$locale->text('Date').qq| | |;
- $column_header{reqdate} = qq||.$locale->text('Required by').qq| | |;
- $column_header{ordnumber} = qq||.$locale->text('Order').qq| | |;
- $column_header{quonumber} = qq||.$locale->text('Quotation').qq| | |;
- $column_header{name} = qq|$name | |;
- $column_header{netamount} = qq||.$locale->text('Amount').qq| | |;
- $column_header{tax} = qq||.$locale->text('Tax').qq| | |;
- $column_header{amount} = qq||.$locale->text('Total').qq| | |;
- $column_header{curr} = qq||.$locale->text('Curr').qq| | |;
- $column_header{shipvia} = qq||.$locale->text('Ship via').qq| | |;
- $column_header{open} = qq||.$locale->text('O').qq| | |;
- $column_header{closed} = qq||.$locale->text('C').qq| | |;
-
- $column_header{employee} = qq|$employee | |;
-
- if ($form->{$form->{vc}}) {
+ $column_header{id} =
+ qq||
+ . $locale->text('ID')
+ . qq| | |;
+ $column_header{transdate} =
+ qq||
+ . $locale->text('Date')
+ . qq| | |;
+ $column_header{reqdate} =
+ qq||
+ . $locale->text('Required by')
+ . qq| | |;
+ $column_header{ordnumber} =
+ qq||
+ . $locale->text('Order')
+ . qq| | |;
+ $column_header{quonumber} =
+ qq||
+ . ($form->{"type"} eq "request_quotation" ?
+ $locale->text('RFQ') :
+ $locale->text('Quotation'))
+ . qq| | |;
+ $column_header{name} =
+ qq|$name | |;
+ $column_header{netamount} =
+ qq|| . $locale->text('Amount') . qq| | |;
+ $column_header{tax} =
+ qq|| . $locale->text('Tax') . qq| | |;
+ $column_header{amount} =
+ qq|| . $locale->text('Total') . qq| | |;
+ $column_header{curr} =
+ qq|| . $locale->text('Curr') . qq| | |;
+ $column_header{shipvia} =
+ qq||
+ . $locale->text('Ship via')
+ . qq| | |;
+ $column_header{globalprojectnumber} =
+ qq|| . $locale->text('Project Number') . qq| | |;
+ $column_header{open} =
+ qq|| . $locale->text('O') . qq| | |;
+ $column_header{closed} =
+ qq|| . $locale->text('C') . qq| | |;
+ $column_header{"delivered"} =
+ qq|| . $locale->text("Delivered") . qq| | |;
+
+ $column_header{employee} =
+ qq|$employee | |;
+
+ $column_header{ids} = qq| | |;
+
+ if ($form->{ $form->{vc} }) {
$option = $locale->text(ucfirst $form->{vc});
$option .= " : $form->{$form->{vc}}";
}
- if ($form->{warehouse}) {
- ($warehouse) = split /--/, $form->{warehouse};
- $option .= "\n
" if ($option);
- $option .= $locale->text('Warehouse');
- $option .= " : $warehouse";
- }
if ($form->{department}) {
$option .= "\n
" if ($option);
($department) = split /--/, $form->{department};
- $option .= $locale->text('Department')." : $department";
+ $option .= $locale->text('Department') . " : $department";
}
if ($form->{transdatefrom}) {
- $option .= "\n
".$locale->text('From')." ".$locale->date(\%myconfig, $form->{transdatefrom}, 1);
+ $option .= "\n
"
+ . $locale->text('From') . " "
+ . $locale->date(\%myconfig, $form->{transdatefrom}, 1);
}
if ($form->{transdateto}) {
- $option .= "\n
".$locale->text('Bis')." ".$locale->date(\%myconfig, $form->{transdateto}, 1);
+ $option .= "\n
"
+ . $locale->text('Bis') . " "
+ . $locale->date(\%myconfig, $form->{transdateto}, 1);
}
if ($form->{open}) {
$option .= "\n
" if ($option);
@@ -1234,12 +1697,13 @@ sub orders {
$option .= "\n
" if ($option);
$option .= $locale->text('Closed');
}
-
+
$form->header;
print qq|
+
@@ -1381,24 +1873,30 @@ print qq|
$lxdebug->leave_sub();
}
-
-
sub subtotal {
$lxdebug->enter_sub();
map { $column_data{$_} = " | " } @column_index;
-
- $column_data{netamount} = "".$form->format_amount(\%myconfig, $subtotalnetamount, 2, " ")." | ";
- $column_data{tax} = "".$form->format_amount(\%myconfig, $subtotalamount - $subtotalnetamount, 2, " ")."";
- $column_data{amount} = " | ".$form->format_amount(\%myconfig, $subtotalamount, 2, " ")." | ";
+
+ $column_data{netamount} =
+ ""
+ . $form->format_amount(\%myconfig, $subtotalnetamount, 2, " ")
+ . " | ";
+ $column_data{tax} = ""
+ . $form->format_amount(\%myconfig, $subtotalamount - $subtotalnetamount,
+ 2, " ")
+ . "";
+ $column_data{amount} =
+ " | "
+ . $form->format_amount(\%myconfig, $subtotalamount, 2, " ") . " | ";
$subtotalnetamount = 0;
- $subtotalamount = 0;
+ $subtotalamount = 0;
print "
";
-
+
map { print "\n$column_data{$_}" } @column_index;
print qq|
@@ -1408,8 +1906,7 @@ sub subtotal {
$lxdebug->leave_sub();
}
-
-sub save {
+sub save_and_close {
$lxdebug->enter_sub();
if ($form->{type} =~ /_order$/) {
@@ -1417,15 +1914,16 @@ sub save {
} else {
$form->isblank("transdate", $locale->text('Quotation Date missing!'));
}
-
+
$msg = ucfirst $form->{vc};
$form->isblank($form->{vc}, $locale->text($msg . " missing!"));
-# $locale->text('Customer missing!');
-# $locale->text('Vendor missing!');
-
- $form->isblank("exchangerate", $locale->text('Exchangerate missing!')) if ($form->{currency} ne $form->{defaultcurrency});
-
+ # $locale->text('Customer missing!');
+ # $locale->text('Vendor missing!');
+
+ $form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
+ if ($form->{currency} ne $form->{defaultcurrency});
+
&validate_items;
# if the name changed get new values
@@ -1435,7 +1933,7 @@ sub save {
}
$form->{id} = 0 if $form->{saveasnew};
-
+
# this is for the internal notes section for the [email] Subject
if ($form->{type} =~ /_order$/) {
if ($form->{type} eq 'sales_order') {
@@ -1445,17 +1943,17 @@ sub save {
$ordnumber = "ordnumber";
} else {
$form->{label} = $locale->text('Purchase Order');
-
+
$numberfld = "ponumber";
$ordnumber = "ordnumber";
}
$err = $locale->text('Cannot save order!');
-
+
} else {
if ($form->{type} eq 'sales_quotation') {
$form->{label} = $locale->text('Quotation');
-
+
$numberfld = "sqnumber";
$ordnumber = "quonumber";
} else {
@@ -1464,20 +1962,116 @@ sub save {
$numberfld = "rfqnumber";
$ordnumber = "quonumber";
}
-
+
$err = $locale->text('Cannot save quotation!');
-
+
}
- $form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld) unless $form->{$ordnumber};
-
- $form->redirect($form->{label}." $form->{$ordnumber} ".$locale->text('saved!')) if (OE->save(\%myconfig, \%$form));
- $form->error($err);
+ # get new number in sequence if no number is given or if saveasnew was requested
+ if (!$form->{$ordnumber} || $form->{saveasnew}) {
+ $form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld);
+ }
+
+ relink_accounts();
+
+ $form->error($err) if (!OE->save(\%myconfig, \%$form));
+
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
+
+ $form->redirect($form->{label} . " $form->{$ordnumber} " .
+ $locale->text('saved!'));
$lxdebug->leave_sub();
}
+sub save {
+ $lxdebug->enter_sub();
+
+ if ($form->{type} =~ /_order$/) {
+ $form->isblank("transdate", $locale->text('Order Date missing!'));
+ } else {
+ $form->isblank("transdate", $locale->text('Quotation Date missing!'));
+ }
+
+ $msg = ucfirst $form->{vc};
+ $form->isblank($form->{vc}, $locale->text($msg . " missing!"));
+
+ # $locale->text('Customer missing!');
+ # $locale->text('Vendor missing!');
+
+ $form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
+ if ($form->{currency} ne $form->{defaultcurrency});
+
+ &validate_items;
+
+ # if the name changed get new values
+ if (&check_name($form->{vc})) {
+ &update;
+ exit;
+ }
+
+ $form->{id} = 0 if $form->{saveasnew};
+
+ # this is for the internal notes section for the [email] Subject
+ if ($form->{type} =~ /_order$/) {
+ if ($form->{type} eq 'sales_order') {
+ $form->{label} = $locale->text('Sales Order');
+
+ $numberfld = "sonumber";
+ $ordnumber = "ordnumber";
+ } else {
+ $form->{label} = $locale->text('Purchase Order');
+
+ $numberfld = "ponumber";
+ $ordnumber = "ordnumber";
+ }
+
+ $err = $locale->text('Cannot save order!');
+
+ } else {
+ if ($form->{type} eq 'sales_quotation') {
+ $form->{label} = $locale->text('Quotation');
+
+ $numberfld = "sqnumber";
+ $ordnumber = "quonumber";
+ } else {
+ $form->{label} = $locale->text('Request for Quotation');
+
+ $numberfld = "rfqnumber";
+ $ordnumber = "quonumber";
+ }
+
+ $err = $locale->text('Cannot save quotation!');
+
+ }
+
+ $form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld)
+ unless $form->{$ordnumber};
+
+ relink_accounts();
+
+ OE->save(\%myconfig, \%$form);
+
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
+ $form->{simple_save} = 1;
+ if(!$form->{print_and_save}) {
+ set_headings("edit");
+ &update;
+ exit;
+ }
+ $lxdebug->leave_sub();
+}
sub delete {
$lxdebug->enter_sub();
@@ -1485,13 +2079,13 @@ sub delete {
$form->header;
if ($form->{type} =~ /_order$/) {
- $msg = $locale->text('Are you sure you want to delete Order Number');
+ $msg = $locale->text('Are you sure you want to delete Order Number');
$ordnumber = 'ordnumber';
} else {
$msg = $locale->text('Are you sure you want to delete Quotation Number');
$ordnumber = 'quonumber';
}
-
+
print qq|
@@ -1507,23 +2101,21 @@ sub delete {
}
print qq|
-|.$locale->text('Confirm!').qq|
+| . $locale->text('Confirm!') . qq|
$msg $form->{$ordnumber}
-
+
|;
-
$lxdebug->leave_sub();
}
-
-
sub yes {
$lxdebug->enter_sub();
@@ -1534,26 +2126,40 @@ sub yes {
$msg = $locale->text('Quotation deleted!');
$err = $locale->text('Cannot delete quotation!');
}
-
- $form->redirect($msg) if (OE->delete(\%myconfig, \%$form, $spool));
+ if (OE->delete(\%myconfig, \%$form, $spool)){
+ $form->redirect($msg);
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{addition} = "DELETED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
+ }
$form->error($err);
$lxdebug->leave_sub();
}
-
-
sub invoice {
$lxdebug->enter_sub();
-
+
if ($form->{type} =~ /_order$/) {
- $form->isblank("ordnumber", $locale->text('Order Number missing!'));
- $form->isblank("transdate", $locale->text('Order Date missing!'));
+ # these checks only apply if the items don't bring their own ordnumbers/transdates.
+ # The if clause ensures that by searching for empty ordnumber_#/transdate_# fields.
+ $form->isblank("ordnumber", $locale->text('Order Number missing!'))
+ if (+{ map { $form->{"ordnumber_$_"}, 1 } (1 .. $form->{rowcount} - 1) }->{''});
+ $form->isblank("transdate", $locale->text('Order Date missing!'))
+ if (+{ map { $form->{"transdate_$_"}, 1 } (1 .. $form->{rowcount} - 1) }->{''});
+
+ # also copy deliverydate from the order
+ $form->{deliverydate} = $form->{reqdate} if $form->{reqdate};
+ $form->{orddate} = $form->{transdate};
} else {
$form->isblank("quonumber", $locale->text('Quotation Number missing!'));
$form->isblank("transdate", $locale->text('Quotation Date missing!'));
$form->{ordnumber} = "";
+ $form->{quodate} = $form->{transdate};
}
# if the name changed get new values
@@ -1562,15 +2168,25 @@ sub invoice {
exit;
}
- ($null, $form->{cp_id}) = split /--/, $form->{contact};
$form->{cp_id} *= 1;
-
- if ($form->{type} =~ /_order/ && $form->{currency} ne $form->{defaultcurrency}) {
+
+ for $i (1 .. $form->{rowcount}) {
+ map({ $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig,
+ $form->{"${_}_${i}"})
+ if ($form->{"${_}_${i}"}) }
+ qw(ship qty sellprice listprice basefactor));
+ }
+
+ if ( $form->{type} =~ /_order/
+ && $form->{currency} ne $form->{defaultcurrency}) {
+
# check if we need a new exchangerate
$buysell = ($form->{type} eq 'sales_order') ? "buy" : "sell";
-
- $orddate = $form->current_date(\%myconfig);
- $exchangerate = $form->check_exchangerate(\%myconfig, $form->{currency}, $orddate, $buysell);
+
+ $orddate = $form->current_date(\%myconfig);
+ $exchangerate =
+ $form->check_exchangerate(\%myconfig, $form->{currency}, $orddate,
+ $buysell);
if (!$exchangerate) {
&backorder_exchangerate($orddate, $buysell);
@@ -1578,16 +2194,23 @@ sub invoice {
}
}
-
# close orders/quotations
$form->{closed} = 1;
- OE->save(\%myconfig, \%$form);
+ # save order if one ordnumber has been given
+ # if not it's most likely a collective order, which can't be saved back
+ # so they just have to be closed
+ if (($form->{ordnumber} ne '') || ($form->{quonumber} ne '')) {
+ OE->close_order(\%myconfig, \%$form);
+ } else {
+ OE->close_orders(\%myconfig, \%$form);
+ }
$form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig);
- $form->{duedate} = $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1);
-
- $form->{id} = '';
+ $form->{duedate} =
+ $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1);
+
+ $form->{id} = '';
$form->{closed} = 0;
$form->{rowcount}--;
$form->{shipto} = 1;
@@ -1597,26 +2220,26 @@ sub invoice {
&create_backorder;
}
-
- if ($form->{type} eq 'purchase_order' || $form->{type} eq 'request_quotation') {
- $form->{title} = $locale->text('Add Vendor Invoice');
+ if ( $form->{type} eq 'purchase_order'
+ || $form->{type} eq 'request_quotation') {
+ $form->{title} = $locale->text('Add Vendor Invoice');
$form->{script} = 'ir.pl';
- $script = "ir";
- $buysell = 'sell';
+ $script = "ir";
+ $buysell = 'sell';
}
if ($form->{type} eq 'sales_order' || $form->{type} eq 'sales_quotation') {
- $form->{title} = $locale->text('Add Sales Invoice');
+ $form->{title} = $locale->text('Add Sales Invoice');
$form->{script} = 'is.pl';
- $script = "is";
- $buysell = 'buy';
+ $script = "is";
+ $buysell = 'buy';
}
-
-
+
# bo creates the id, reset it
- map { delete $form->{$_} } qw(id subject message cc bcc printed emailed queued);
- $form->{$form->{vc}} =~ s/--.*//g;
+ map { delete $form->{$_} }
+ qw(id subject message cc bcc printed emailed queued);
+ $form->{ $form->{vc} } =~ s/--.*//g;
$form->{type} = "invoice";
-
+
# locale messages
$locale = new Locale "$myconfig{countrycode}", "$script";
@@ -1624,43 +2247,59 @@ sub invoice {
map { $form->{"select$_"} = "" } ($form->{vc}, currency);
- map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(creditlimit creditremaining);
+ map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) }
+ qw(creditlimit creditremaining);
$currency = $form->{currency};
&invoice_links;
- $form->{currency} = $currency;
+ $form->{currency} = $currency;
$form->{exchangerate} = "";
- $form->{forex} = "";
- $form->{exchangerate} = $exchangerate if ($form->{forex} = ($exchangerate = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, $buysell)));
-
+ $form->{forex} = "";
+ $form->{exchangerate} = $exchangerate
+ if (
+ $form->{forex} = (
+ $exchangerate =
+ $form->check_exchangerate(
+ \%myconfig, $form->{currency}, $form->{invdate}, $buysell
+ )));
+
$form->{creditremaining} -= ($form->{oldinvtotal} - $form->{ordtotal});
&prepare_invoice;
# format amounts
for $i (1 .. $form->{rowcount}) {
- $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"});
-
+ $form->{"discount_$i"} =
+ $form->format_amount(\%myconfig, $form->{"discount_$i"});
+
($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
- $dec = length $dec;
+ $dec = length $dec;
$decimalplaces = ($dec > 2) ? $dec : 2;
- $form->{"sellprice_$i"} = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces);
- $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
+ # copy delivery date from reqdate for order -> invoice conversion
+ $form->{"deliverydate_$i"} = $form->{"reqdate_$i"}
+ unless $form->{"deliverydate_$i"};
+
+ $form->{"sellprice_$i"} =
+ $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
+ $decimalplaces);
+
+ (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
+ $dec_qty = length $dec_qty;
+ $form->{"qty_$i"} =
+ $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
+
+ map { $form->{"${_}_$i"} =~ s/\"/"/g }
+ qw(partnumber description unit);
- map { $form->{"${_}_$i"} =~ s/\"/"/g } qw(partnumber description unit);
-
}
-
&display_form;
$lxdebug->leave_sub();
}
-
-
sub backorder_exchangerate {
$lxdebug->enter_sub();
my ($orddate, $buysell) = @_;
@@ -1682,7 +2321,7 @@ sub backorder_exchangerate {
}
$form->{title} = $locale->text('Add Exchangerate');
-
+
print qq|
{path}>
@@ -1699,15 +2338,15 @@ sub backorder_exchangerate {
@@ -1720,7 +2359,8 @@ sub backorder_exchangerate {
-
+
@@ -1728,43 +2368,43 @@ sub backorder_exchangerate {
|