x
This commit is contained in:
@@ -23,7 +23,11 @@ from .finance_schemas import (
|
||||
FinanceTransactionResponse,
|
||||
FinanceSummaryResponse,
|
||||
ReceivableItemResponse,
|
||||
PayableItemResponse
|
||||
PayableItemResponse,
|
||||
PartnerStatementItemResponse,
|
||||
FinancePartnerStatementResponse,
|
||||
PartnerProductStatementItemResponse,
|
||||
FinancePartnerProductStatementResponse
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
@@ -39,4 +43,6 @@ __all__ = [
|
||||
"ReceiptCreate", "PaymentCreate",
|
||||
"FinanceAllocationResponse", "FinanceTransactionResponse",
|
||||
"FinanceSummaryResponse", "ReceivableItemResponse", "PayableItemResponse",
|
||||
"PartnerStatementItemResponse", "FinancePartnerStatementResponse",
|
||||
"PartnerProductStatementItemResponse", "FinancePartnerProductStatementResponse",
|
||||
]
|
||||
|
||||
@@ -66,6 +66,11 @@ class FinanceSummaryResponse(BaseModel):
|
||||
payable_total: float
|
||||
monthly_receipt_total: float
|
||||
monthly_payment_total: float
|
||||
selected_year: int
|
||||
selected_quarter: Optional[int] = None
|
||||
period_label: str
|
||||
period_receipt_total: float = 0
|
||||
period_payment_total: float = 0
|
||||
overdue_receivable_count: int = 0
|
||||
overdue_payable_count: int = 0
|
||||
|
||||
@@ -92,3 +97,55 @@ class PayableItemResponse(BaseModel):
|
||||
paid_amount: float
|
||||
payable_amount: float
|
||||
status: str
|
||||
|
||||
|
||||
class PartnerStatementItemResponse(BaseModel):
|
||||
partner_id: int
|
||||
partner_name: str
|
||||
order_count: int
|
||||
transaction_count: int
|
||||
order_total: float
|
||||
settled_total: float
|
||||
transaction_total: float
|
||||
outstanding_total: float
|
||||
period_year: int
|
||||
period_quarter: Optional[int] = None
|
||||
|
||||
|
||||
class FinancePartnerStatementResponse(BaseModel):
|
||||
partner_type: PartnerType
|
||||
year: int
|
||||
quarter: Optional[int] = None
|
||||
period_label: str
|
||||
order_total: float
|
||||
settled_total: float
|
||||
transaction_total: float
|
||||
outstanding_total: float
|
||||
items: List[PartnerStatementItemResponse] = []
|
||||
|
||||
|
||||
class PartnerProductStatementItemResponse(BaseModel):
|
||||
partner_id: int
|
||||
partner_name: str
|
||||
product_id: int
|
||||
product_sku: Optional[str] = None
|
||||
product_name: str
|
||||
order_count: int
|
||||
order_quantity: float
|
||||
order_amount: float
|
||||
settled_amount: float
|
||||
outstanding_amount: float
|
||||
period_year: int
|
||||
period_quarter: Optional[int] = None
|
||||
|
||||
|
||||
class FinancePartnerProductStatementResponse(BaseModel):
|
||||
partner_type: PartnerType
|
||||
year: int
|
||||
quarter: Optional[int] = None
|
||||
period_label: str
|
||||
partner_id: Optional[int] = None
|
||||
order_amount_total: float
|
||||
settled_amount_total: float
|
||||
outstanding_amount_total: float
|
||||
items: List[PartnerProductStatementItemResponse] = []
|
||||
|
||||
@@ -5,6 +5,7 @@ from datetime import datetime
|
||||
|
||||
class StockMovementCreate(BaseModel):
|
||||
product_id: int
|
||||
product_sku: Optional[str] = None
|
||||
warehouse_id: int
|
||||
movement_type: str
|
||||
quantity: int
|
||||
@@ -14,6 +15,8 @@ class StockMovementCreate(BaseModel):
|
||||
|
||||
class StockMovementResponse(BaseModel):
|
||||
id: int
|
||||
product_id: int
|
||||
product_sku: Optional[str]
|
||||
product_name: str
|
||||
movement_type: str
|
||||
quantity: int
|
||||
|
||||
Reference in New Issue
Block a user