Skip to content

Commit d607c32

Browse files
Improved invoice type
1 parent 24f6f35 commit d607c32

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

nxtbn/order/admin_types.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ class OrderInvoiceType(DjangoObjectType):
8787
humanize_total_price = graphene.String()
8888
items = graphene.List(OrderInvoiceLineItemType)
8989
total_price = graphene.String()
90+
total_tax = graphene.String()
91+
total_shipping_cost = graphene.String()
92+
total_price_without_tax = graphene.String()
93+
total_discounted_amount = graphene.String()
9094

9195
def resolve_humanize_total_price(self, info):
9296
return self.humanize_total_price()
@@ -97,6 +101,18 @@ def resolve_items(self, info):
97101
def resolve_total_price(self, info):
98102
return self.humanize_total_price()
99103

104+
def resolve_total_tax(self, info):
105+
return self.humanize_total_tax()
106+
107+
def resolve_total_shipping_cost(self, info):
108+
return self.humanize_total_shipping_cost()
109+
110+
def resolve_total_price_without_tax(self, info):
111+
return self.humanize_total_tax()
112+
113+
def resolve_total_discounted_amount(self, info):
114+
return self.humanize_total_discounted_amount()
115+
100116
class Meta:
101117
model = Order
102118
fields = (
@@ -106,10 +122,6 @@ class Meta:
106122
'shipping_address',
107123
'billing_address',
108124
'created_at',
109-
'total_price_without_tax',
110-
'total_shipping_cost',
111-
'total_discounted_amount',
112-
'total_tax',
113125
'customer_currency',
114126
'currency_conversion_rate',
115127
'authorize_status',

0 commit comments

Comments
 (0)