corrections in stockrequest table
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type StockRequestService interface {
|
||||
CreateStockRequest(req *models.StockRequest) error
|
||||
GetStockRequests(tenantID int, locationID int, status string, pageNo int, pageSize int) ([]models.StockRequest, error)
|
||||
GetStockRequests(tenantID int, locationID int, status string, date string, pageNo int, pageSize int) ([]models.StockRequest, error)
|
||||
UpdateStockRequest(requestID int, status string) error
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ func (s *stockRequestService) CreateStockRequest(req *models.StockRequest) error
|
||||
return s.repo.CreateStockRequest(req)
|
||||
}
|
||||
|
||||
func (s *stockRequestService) GetStockRequests(tenantID int, locationID int, status string, pageNo int, pageSize int) ([]models.StockRequest, error) {
|
||||
return s.repo.GetStockRequests(tenantID, locationID, status, pageNo, pageSize)
|
||||
func (s *stockRequestService) GetStockRequests(tenantID int, locationID int, status string, date string, pageNo int, pageSize int) ([]models.StockRequest, error) {
|
||||
return s.repo.GetStockRequests(tenantID, locationID, status, date, pageNo, pageSize)
|
||||
}
|
||||
|
||||
func (s *stockRequestService) UpdateStockRequest(requestID int, status string) error {
|
||||
@@ -43,7 +43,7 @@ func (s *stockRequestService) UpdateStockRequest(requestID int, status string) e
|
||||
Locationid: req.Locationid,
|
||||
Productid: req.Productid,
|
||||
Quantity: req.Qty,
|
||||
Stocktype: "Credit",
|
||||
Stocktype: "in",
|
||||
Stockdate: time.Now(),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user