feature/outlet-table #10

Open
aefril wants to merge 7 commits from feature/outlet-table into main
Showing only changes of commit 312ea94e62 - Show all commits

View File

@ -105,7 +105,7 @@ func (r *OrganizationRepositoryImpl) GetTotalOmset(ctx context.Context, organiza
var total float64 var total float64
err := r.db.WithContext(ctx). err := r.db.WithContext(ctx).
Table("orders"). Table("orders").
Where("organization_id = ? AND payment_status = ?", organizationID, "completed"). Where("organization_id = ? AND payment_status = ? AND is_void = ? AND is_refund = ?", organizationID, "completed", false, false).
Select("COALESCE(SUM(total_amount), 0)"). Select("COALESCE(SUM(total_amount), 0)").
Scan(&total).Error Scan(&total).Error
return total, err return total, err