mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX]pms_api_rest: added discount in folio sale line and invoice GET service
This commit is contained in:
@@ -11,6 +11,7 @@ class PmsFolioSaleInfo(Datamodel):
|
||||
qtyToInvoice = fields.Float(required=False, allow_none=True)
|
||||
qtyInvoiced = fields.Float(required=False, allow_none=True)
|
||||
priceTotal = fields.Float(required=False, allow_none=True)
|
||||
discount = fields.Float(required=False, allow_none=True)
|
||||
productQty = fields.Float(required=False, allow_none=True)
|
||||
reservationId = fields.Integer(required=False, allow_none=True)
|
||||
serviceId = fields.Integer(required=False, allow_none=True)
|
||||
|
||||
@@ -10,5 +10,6 @@ class PmsInvoiceLineInfo(Datamodel):
|
||||
quantity = fields.Float(required=False, allow_none=True)
|
||||
priceUnit = fields.Float(required=False, allow_none=True)
|
||||
total = fields.Float(required=False, allow_none=True)
|
||||
discount = fields.Float(required=False, allow_none=True)
|
||||
displayType = fields.String(required=False, allow_none=True)
|
||||
saleLineId = fields.Integer(required=False, allow_none=True)
|
||||
|
||||
@@ -488,6 +488,7 @@ class PmsFolioService(Component):
|
||||
priceTotal=sale_line.price_total
|
||||
if sale_line.price_total
|
||||
else None,
|
||||
discount=sale_line.discount if sale_line.discount else None,
|
||||
productQty=sale_line.product_uom_qty
|
||||
if sale_line.product_uom_qty
|
||||
else None,
|
||||
@@ -542,6 +543,9 @@ class PmsFolioService(Component):
|
||||
total=move_line.price_total
|
||||
if move_line.price_total
|
||||
else None,
|
||||
discount=move_line.discount
|
||||
if move_line.discount
|
||||
else None,
|
||||
displayType=move_line.display_type
|
||||
if move_line.display_type
|
||||
else None,
|
||||
|
||||
Reference in New Issue
Block a user