Commit 3c576a36 authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'units' into 'master'

Fixed unit specification on invoices from client to API

See merge request !48
parents 20bd3d40 6d06da0a
Pipeline #4198 passed with stages
in 2 minutes and 42 seconds
......@@ -56,7 +56,7 @@ our $pluginInfo = {
MenuItem => "LinkInventory",
Regex => "linkinventory",
Desc => "Link inventory item",
Help => 'linkinventory invoice="<invoice number>" inventory="<inventory item code>" [description="<description of item>"] [serial="<serial number of item>"] qty="<quantity>" [unitprice="<unit price>"] [discount="<discount>"] [taxtype="<tax type id>"]',
Help => 'linkinventory invoice="<invoice number>" inventory="<inventory item code>" [description="<description of item>"] [serial="<serial number of item>"] qty="<quantity>" [unit="<unit>"] [unitprice="<unit price>"] [discount="<discount>"] [taxtype="<tax type id>"]',
Function => \&linkInventoryItem,
},
# {
......@@ -216,6 +216,7 @@ sub linkInventoryItem
$detail->{'Description'} = $parms->{'description'};
$detail->{'SerialNumber'} = $parms->{'serial'};
$detail->{'Quantity'} = $parms->{'qty'};
$detail->{'Unit'} = $parms->{'unit'};
$detail->{'UnitPrice'} = $parms->{'unitprice'};
$detail->{'Discount'} = $parms->{'discount'};
$detail->{'TaxTypeID'} = $parms->{'taxtype'};
......
......@@ -260,6 +260,7 @@ sub createInvoice {
# InventoryCode - Inventory code
# Optional:
# Description - Description
# Unit - Unit
# UnitPrice - Unit price
# Quantity - Quantity
# Discount - Discount %
......@@ -289,6 +290,7 @@ sub linkInvoiceItem {
$detail->{'Quantity'} = $data->{'Quantity'};
$detail->{'TaxTypeID'} = $data->{'TaxTypeID'};
$detail->{'Discount'} = $data->{'Discount'};
$detail->{'Unit'} = $data->{'Unit'};
$detail->{'UnitPrice'} = $data->{'UnitPrice'};
my $res = wiaflos::server::core::Invoicing::linkInvoiceItem($detail);
if ($res < 1) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment