lib/app/quoteitem-helpers.go

35 lines
1.2 KiB
Go
Raw Permalink Normal View History

2021-01-14 06:36:35 +00:00
package app
import "code.tnxs.net/taxnexus/lib/api/ops/ops_models"
func (obj *QuoteItem) MarshalToSwagger() *ops_models.QuoteItem {
return &ops_models.QuoteItem{
ID: obj.ID,
COGS: obj.COGS,
CreatedByID: obj.CreatedByID,
CreatedDate: obj.CreatedDate.Time.Format(dateTimeFormat),
Description: obj.Description,
Discount: obj.Discount,
DiscountAmount: obj.DiscountAmount,
LastModifiedByID: obj.LastModifiedByID,
LastModifiedDate: obj.LastModifiedDate.Time.Format(dateTimeFormat),
ListPrice: obj.ListPrice,
MRCInterval: obj.MRCInterval,
ParentFK: obj.ParentFK,
ProductCode: obj.ProductCode,
ProductID: obj.ProductID,
ProductName: obj.ProductName,
Quantity: obj.Quantity,
QuoteID: obj.QuoteID,
Ref: obj.Ref,
ServiceDate: obj.ServiceDate.Time.Format(dateTimeFormat),
ShippingHandling: obj.ShippingHandling,
Subtotal: obj.Subtotal,
TaxnexusCode: obj.TaxnexusCodeDisplay,
TenantID: obj.TenantID,
TotalPrice: obj.TotalPrice,
UnitPrice: obj.UnitPrice,
Units: obj.Units,
}
}