...
 
Commits (2)
......@@ -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) {
......