package dto

import (
	areaDTO "gitlab.com/mbugroup/lti-api.git/internal/modules/master/areas/dto"
	supplierDTO "gitlab.com/mbugroup/lti-api.git/internal/modules/master/suppliers/dto"
	warehouseDTO "gitlab.com/mbugroup/lti-api.git/internal/modules/master/warehouses/dto"
)

type DebtSupplierRowDTO struct {
	PrNumber     string                             `json:"pr_number"`
	PoNumber     string                             `json:"po_number"`
	PoDate       string                             `json:"po_date"`
	ReceivedDate string                             `json:"received_date"`
	Aging        int                                `json:"aging"`
	Area         *areaDTO.AreaRelationDTO           `json:"area,omitempty"`
	Warehouse    *warehouseDTO.WarehouseRelationDTO `json:"warehouse,omitempty"`
	DueDate      string                             `json:"due_date"`
	DueStatus    string                             `json:"due_status"`
	TotalPrice   float64                            `json:"total_price"`
	PaymentPrice float64                            `json:"payment_price"`
	DebtPrice    float64                            `json:"debt_price"`
	Status       string                             `json:"status"`
	TravelNumber string                             `json:"travel_number"`
	Balance      float64                            `json:"balance"`
}

type DebtSupplierTotalDTO struct {
	Aging        int     `json:"aging"`
	TotalPrice   float64 `json:"total_price"`
	PaymentPrice float64 `json:"payment_price"`
	DebtPrice    float64 `json:"debt_price"`
}

type DebtSupplierDTO struct {
	Supplier       *supplierDTO.SupplierRelationDTO `json:"supplier"`
	InitialBalance float64                          `json:"initial_balance"`
	Rows           []DebtSupplierRowDTO             `json:"rows"`
	Total          DebtSupplierTotalDTO             `json:"total"`
}
