feat: implement purchase receipt items management with create, update, find, and delete functionalities
feat: add purchase receipts management with create, update, find, and delete functionalities feat: implement sales invoice items management with create, update, find, and delete functionalities feat: add sales invoices management with create, update, find, and delete functionalities feat: implement stock adjustments management with create, update, find, and delete functionalities feat: add stock balance retrieval functionality feat: implement stock movements management with create, update, find, and delete functionalities
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
SELECT
|
||||
`sm`.`productId` AS `productId`,
|
||||
`sm`.`id` AS `movement_id`,
|
||||
`sm`.`type` AS `type`,
|
||||
`sm`.`quantity` AS `quantity`,
|
||||
`sm`.`fee` AS `fee`,
|
||||
`sm`.`totalCost` AS `totalCost`,
|
||||
`sb`.`quantity` AS `balance_quantity`,
|
||||
`sb`.`avgCost` AS `balance_avg_cost`,
|
||||
`sm`.`createdAt` AS `createdAt`
|
||||
FROM
|
||||
(
|
||||
`pos`.`Stock_Movements` `sm`
|
||||
LEFT JOIN `pos`.`stock_balance` `sb` ON((`sb`.`ProductId` = `sm`.`productId`))
|
||||
)
|
||||
ORDER BY
|
||||
`sm`.`productId`,
|
||||
`sm`.`createdAt`
|
||||
Reference in New Issue
Block a user