Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Tax to Stockmoves
09-01-2017, 03:34 AM, (This post was last modified: 09-01-2017, 03:35 AM by daveparrish.)
#1
Post Tax to Stockmoves
I have created a column in the stockmoves table named item_tax and am trying to post the tax for each line item in this the table.
The reason for this we have some items, that are not taxable in some states but not others so making the item taxable or not is not an option and I need to generate a report that shows the tax by item for each customer.
I can get the code to post the tax total to each item but not just the tax for that line.

Here is the line of code around line 413 of ConfirmDispatch_invoice.php
//Added line tax to post to stockmoves

$LineTax = locale_number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces);

And here is the Insert INto the table around line 1031

$SQL = "INSERT INTO stockmoves (stockid,
type,
transno,
loccode,
trandate,
userid,
debtorno,
branchcode,
prd,
reference,
qty,
standardcost,
show_on_inv_crds,
newqoh,
item_tax)
VALUES ('" . $AssParts['component'] . "',
10,
'" . $InvoiceNo . "',
'" . $_SESSION['Items'.$identifier]->Location . "',
'" . $DefaultDispatchDate . "',
'" . $_SESSION['UserID'] . "',
'" . $_SESSION['Items'.$identifier]->DebtorNo . "',
'" . $_SESSION['Items'.$identifier]->Branch . "',
'" . $PeriodNo . "',
'" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $_SESSION['ProcessingOrder'] . "',
'" . -$AssParts['quantity'] * $OrderLine->QtyDispatched . "',
'" . $AssParts['standard'] . "',
0,
'" . ($QtyOnHandPrior - $AssParts['quantity'] * $OrderLine->QtyDispatched) . "',
'" . $LineTax . "')";

Thanks to ALL
Reply


Messages In This Thread
Post Tax to Stockmoves - by daveparrish - 09-01-2017, 03:34 AM
RE: Post Tax to Stockmoves - by phil - 09-01-2017, 07:39 AM
RE: Post Tax to Stockmoves - by daveparrish - 09-05-2017, 11:15 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)