/*
**************************************************************************************
* Program Name  : PurchaseOrderService.java
* Author        : Kawade Swapnali
* Date          : Feb 14, 2026
* System Name   : gswbs
* SRF No.       : 
* Purpose       : To define business operations for Purchase Order module such as
*                 Fetch, Save (bulk with auto ID generation), Update and Delete
*                 (single & bulk).
*
* Fields        : purchaseOrderId (PK),
*                 purchaseOrderNo,
*                 vendorName,
*                 vendorGSTNo,
*                 vendorAddress,
*                 requestedBy,
*                 purchaseOrderStatus,
*                 assetType,
*                 assetMake,
*                 assetModel,
*                 description,
*                 quantity,
*                 unitPrice,
*                 gstPercentage,
*                 gstAmount,
*                 subTotal,
*                 grandTotal,
*                 purchaseOrderCreateDate,
*                 deliveryLocation,
*                 expectedDate,
*                 loginId,
*                 status
*
* Functions     : getSinglePurchaseOrder(),
*                 getAllPurchaseOrderByLoginId(),
*                 saveAllPurchaseOrder(),
*                 update(),
*                 delete(),
*                 multipalDelete()
*
* Called From   : PurchaseOrderController
* Beans Accessed: PurchaseOrderRepository, PurchaseOrder (Entity)
**************************************************************************************
*/
package com.coder.purchase.order.service;

import java.util.List;

import com.coder.purchase.order.dto.PurchaseOrderDTO;
import com.coder.purchase.order.model.PurchaseOrder;
import com.coder.purchase.order.model.SaveToPurchaseOrderResponse;

public interface PurchaseOrderService {

    /* FETCH SINGLE PurchaseOrder BY PurchaseOrder ID */
    PurchaseOrderDTO getSinglePurchaseOrder(String purchaseOrderId);
    
    /* FETCH ALL PURCHASE ORDER */
    List<PurchaseOrderDTO> fetchAllPurchaseOrder();

    /* FETCH ALL PurchaseOrders BY Login ID */
    List<PurchaseOrderDTO> getAllPurchaseOrderByCreatedBy(String createdBy);

    /*
     * SAVE MULTIPLE PurchaseOrders AT ONE TIME AND CREATE EACH PurchaseOrder ID AUTOMATICALLY
     * Example: PO/2026/001
     */
    SaveToPurchaseOrderResponse saveAllPurchaseOrder(List<PurchaseOrder> purchaseOrderList);

    /* UPDATE SINGLE PurchaseOrder BY PurchaseOrder ID AND Login ID */
    PurchaseOrder update(String purchaseOrderId, PurchaseOrder purchaseOrder);

    /* DELETE MULTIPLE PurchaseOrders AT ONE TIME BY PurchaseOrder ID LIST */
    boolean multipalDelete(List<String> purchaseOrderIds);
    PurchaseOrderDTO convertPurchaseOrderIntoPurchaseOrderDTO(PurchaseOrder purchaseOrder);
//    PurchaseOrder getById(String purchaseOrderId);
//
//    PurchaseOrder save(PurchaseOrder po);
}
