const express = require("express");
const {
  createEditPurchaseOrder,
  getAllSellersCompany,
  getAllSuppliers,
  getSellersCompanyProducts,
  getForApprovalPOs,
  approveRejectPO,
  getWarehouses,
  getAvailablePOs,
  createEditPurchaseOrderReceive,
  getSellersCompanyProductsWithPoStocks,
  inventoryTransfer,
  inventoryTransferLists,
  handleInventoryTransferApproval,
  inventoryReport,
  bstOrderFormSearch,
  bstDoTransfer,
  inventoryReportDetailed,
  getAvailableTaxCodes,
  generatePOQRCode,
  inventoryReportDetailedAll,
  verifyRR,
  getSuggestedMatchingProduct
} = require("../../../../controllers/admin/purchase-orders");
const router = express.Router();

router.post("/create-edit", createEditPurchaseOrder);
router.get("/sellers-company", getAllSellersCompany);
router.get("/suppliers", getAllSuppliers);
router.get("/products", getSellersCompanyProducts);
router.get("/products-with-po-stock", getSellersCompanyProductsWithPoStocks);
router.get("/for-approval", getForApprovalPOs);
router.post("/decision", approveRejectPO);
router.get("/warehouses", getWarehouses);
router.get("/available-pos", getAvailablePOs);
router.post("/create-edit-receive", createEditPurchaseOrderReceive);
router.post("/inventory-transfer", inventoryTransfer);
router.get("/inventory-transfer", inventoryTransferLists);
router.put("/inventory-transfer", handleInventoryTransferApproval);
router.post("/inventory-report", inventoryReport);
router.post("/bst-order-form", bstOrderFormSearch);
router.post("/bst-do-transfer", bstDoTransfer);
router.post("/inventory-report-detailed", inventoryReportDetailed);
router.post("/inventory-report-detailed-all", inventoryReportDetailedAll);
router.get("/tax-codes", getAvailableTaxCodes);
router.get("/generate-qr", generatePOQRCode);
router.post("/verify-rr", verifyRR);
router.get("/match-product", getSuggestedMatchingProduct);
module.exports = router;
