Add new fields to order model

This commit is contained in:
Rene Vergara 2022-08-03 15:55:51 -05:00
parent 80798093dd
commit 7516eaf11f
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2
7 changed files with 24 additions and 1 deletions

View file

@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
## Added
- Add `crmToken` field to `owner.model.ts`
- Add `externalInvoice` field and `shortCode` field to `order.model.ts`
## [1.2.1] - 2022-08-01
### Changed

View file

@ -34,6 +34,8 @@ export class InvoiceComponent implements OnInit {
total: 0,
totalZec: 0,
paid: false,
externalInvoice: '',
shortCode: '',
lines: [
{
qty: 1,

View file

@ -41,6 +41,8 @@ export class OrderComponent implements OnInit{
total:0,
totalZec: 0,
paid: false,
externalInvoice: '',
shortCode: '',
lines: [
{
qty: 1,

View file

@ -11,5 +11,7 @@ export interface Order {
total: number,
totalZec: number,
lines: LineItem[],
paid: boolean
paid: boolean,
externalInvoice: string,
shortCode: string
}

View file

@ -63,6 +63,8 @@ export class OrderService {
total: 0,
totalZec: 0,
paid: false,
externalInvoice: '',
shortCode: '',
lines: [
{
qty: 1,
@ -164,6 +166,8 @@ export class OrderService {
price: 0,
total: 0,
paid: false,
externalInvoice: '',
shortCode: '',
lines: [lineItem]
};
let obs = this.http.post<{message: string, order: Order}>(this.beUrl+'api/order', {payload: order}, { headers: this.reqHeaders });
@ -191,6 +195,8 @@ export class OrderService {
totalZec: 0,
price: 0,
paid: false,
externalInvoice: '',
shortCode: '',
lines: [
{
qty: 1,
@ -224,6 +230,8 @@ export class OrderService {
total: 0,
totalZec: 0,
paid: false,
externalInvoice: '',
shortCode: '',
lines: [
{
qty: 1,

View file

@ -52,6 +52,8 @@ export class ReceiptService {
total: 0,
totalZec: 0,
paid: false,
externalInvoice: '',
shortCode: '',
lines: [
{
qty: 1,

View file

@ -25,6 +25,8 @@ export class ReceiptComponent implements OnInit {
total: 0,
totalZec: 0,
paid: false,
externalInvoice: '',
shortCode: '',
lines: [
{
qty: 1,