mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
unfinished purchase
This commit is contained in:
@@ -205,8 +205,23 @@ const (
|
||||
|
||||
var RecordingApprovalSteps = map[approvalutils.ApprovalStep]string{
|
||||
RecordingStepGradingTelur: "Grading-Telur",
|
||||
RecordingStepPengajuan: "Pengajuan",
|
||||
RecordingStepDisetujui: "Disetujui",
|
||||
RecordingStepPengajuan: "Pengajuan",
|
||||
RecordingStepDisetujui: "Disetujui",
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Purchase Approval
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
const (
|
||||
ApprovalWorkflowPurchase approvalutils.ApprovalWorkflowKey = approvalutils.ApprovalWorkflowKey("PURCHASES")
|
||||
PurchaseStepPengajuan approvalutils.ApprovalStep = 1
|
||||
PurchaseStepStaffPurchase approvalutils.ApprovalStep = 2
|
||||
)
|
||||
|
||||
var PurchaseApprovalSteps = map[approvalutils.ApprovalStep]string{
|
||||
PurchaseStepPengajuan: "Pengajuan",
|
||||
PurchaseStepStaffPurchase: "Staff Purchase",
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
@@ -12,7 +12,10 @@ func MapBodyWeights(recordingID uint, items []validation.BodyWeight) []entity.Re
|
||||
|
||||
result := make([]entity.RecordingBW, 0, len(items))
|
||||
for _, item := range items {
|
||||
totalWeight := item.TotalWeight
|
||||
var totalWeight float64
|
||||
if item.TotalWeight != nil {
|
||||
totalWeight = *item.TotalWeight
|
||||
}
|
||||
if totalWeight <= 0 {
|
||||
totalWeight = item.AvgWeight * item.Qty
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user