mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
feat: reimplement with plan hppv2 flow and logics
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package service
|
||||
|
||||
type HppV2DateWindow struct {
|
||||
Start string `json:"start"`
|
||||
End string `json:"end"`
|
||||
}
|
||||
|
||||
type HppV2Proration struct {
|
||||
Basis string `json:"basis"`
|
||||
Numerator float64 `json:"numerator"`
|
||||
Denominator float64 `json:"denominator"`
|
||||
Ratio float64 `json:"ratio"`
|
||||
}
|
||||
|
||||
type HppV2Reference struct {
|
||||
Type string `json:"type"`
|
||||
ID uint `json:"id"`
|
||||
StockableType string `json:"stockable_type,omitempty"`
|
||||
ProjectFlockKandangID *uint `json:"project_flock_kandang_id,omitempty"`
|
||||
ProductID uint `json:"product_id,omitempty"`
|
||||
ProductName string `json:"product_name,omitempty"`
|
||||
Date string `json:"date,omitempty"`
|
||||
Qty float64 `json:"qty"`
|
||||
UnitPrice float64 `json:"unit_price"`
|
||||
Total float64 `json:"total"`
|
||||
AppliedTotal float64 `json:"applied_total"`
|
||||
}
|
||||
|
||||
type HppV2ComponentPart struct {
|
||||
Code string `json:"code"`
|
||||
Title string `json:"title"`
|
||||
Total float64 `json:"total"`
|
||||
Proration *HppV2Proration `json:"proration,omitempty"`
|
||||
References []HppV2Reference `json:"references,omitempty"`
|
||||
}
|
||||
|
||||
type HppV2Component struct {
|
||||
Code string `json:"code"`
|
||||
Title string `json:"title"`
|
||||
Total float64 `json:"total"`
|
||||
Parts []HppV2ComponentPart `json:"parts"`
|
||||
}
|
||||
|
||||
type HppV2Breakdown struct {
|
||||
ProjectFlockKandangID uint `json:"project_flock_kandang_id"`
|
||||
ProjectFlockID uint `json:"project_flock_id"`
|
||||
ProjectFlockCategory string `json:"project_flock_category,omitempty"`
|
||||
KandangID uint `json:"kandang_id,omitempty"`
|
||||
KandangName string `json:"kandang_name,omitempty"`
|
||||
LocationID uint `json:"location_id,omitempty"`
|
||||
PeriodDate string `json:"period_date"`
|
||||
Window HppV2DateWindow `json:"window"`
|
||||
TotalProductionCost float64 `json:"total_production_cost"`
|
||||
Components []HppV2Component `json:"components"`
|
||||
Hpp HppCostResponse `json:"hpp"`
|
||||
}
|
||||
Reference in New Issue
Block a user