SELECT InvMovements.TrnYear, InvMovements.TrnMonth, InvMovements.StockCode, InvMaster.Description, InvMovements.Customer, InvMovements.TrnQty,
InvMovements.TrnValue, InvMovements.CostValue, InvMaster.MaterialCost * InvMovements.TrnQty AS Material,
InvMaster.LabourCost * InvMovements.TrnQty AS Labor, InvMaster.SubContractCost * InvMovements.TrnQty AS OSP,
InvMaster.VariableOverhead * InvMovements.TrnQty AS VOH, InvMaster.FixOverhead * InvMovements.TrnQty AS FOH,
InvMovements.TrnValue - InvMovements.CostValue AS Margin
FROM InvMaster InvMaster INNER JOIN
InvMovements InvMovements ON InvMaster.StockCode = InvMovements.StockCode
WHERE (InvMovements.MovementType = 'S') AND (InvMovements.TrnYear = $2010) AND (InvMovements.TrnMonth = $6)
|