

const express = require("express");
const router = express.Router();
const salesReportController = require("../../controllers/sales/salesReportController");
const authenticate = require("../../middlewares/authenticate");



router.get("/get-reports",authenticate,(req,res)=>{
    salesReportController.getCustomerReport(req,res);
});

router.get("/get-excelreports",(req,res)=>{
    salesReportController.getCustomerExcelReport(req,res);
});


router.get("/get-orders", authenticate, (req,res)=>{
       salesReportController.getOrderReport(req,res);
})


router.get("/orderExcels",authenticate, (req,res)=>{
       salesReportController.getOrderExcelReport(req,res);
})

router.get("/get-invoices",authenticate, (req,res) => {
      salesReportController.getInvoiceReport(req,res);
});

router.get("/invoiceExcels",(req,res) => {
      salesReportController.exportInvoiceReportExcel(req,res);
});



router.get("/get-dispatches",authenticate, (req,res) =>{
  salesReportController.getDispatchReport(req,res)
});

router.get("/dispatchExcels",(req,res) =>{
  salesReportController.exportDispatchReportExcel(req,res)
});
module.exports = router;

