Post Reply 
 
Thread Rating:
  • 0 Votes - 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.)
Post: #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
Find all posts by this user
Quote this message in a reply
09-01-2017, 07:39 AM
Post: #2
RE: Post Tax to Stockmoves
Hi Dave,
Well this is whey we have a taxgroup against the customer branch - so you can show only the taxes relevant for this customer branch. You need to create tax groups with the various permutations of taxes applicable. If no tax is applicable you may need to create a tax group with just a single tax authority with rates all zip.

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
09-05-2017, 11:15 PM
Post: #3
RE: Post Tax to Stockmoves
Phil
Thanks for the help I think I understand the groups and rates, the issues is there is some customers that purchase several items and there may be some items that they collect the tax on because they buy them for resale, so they collect the tax on those items. When an invoice is processed the tax is reduced to 0.00 for the resale items and we need to capture those 0.00 sales.
Thanks
Dave
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)