@unimaze/billing 0.12.7 → 0.12.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -96,6 +96,9 @@ var convertToInvoiceMetadataInput = function (formValues, invoiceLinesWithCalcul
96
96
  };
97
97
  };
98
98
  var vatNumber = invoice.supplier.vatNumber ? invoice.supplier.vatNumber : "";
99
+ var orderReference = invoice.orderReference && invoice.orderReference.hasOwnProperty("documentNo")
100
+ ? invoice.orderReference
101
+ : undefined;
99
102
  var resp = {
100
103
  messageHandling: getMessageHandling(chosenCustomer),
101
104
  invoice: {
@@ -141,12 +144,15 @@ var convertToInvoiceMetadataInput = function (formValues, invoiceLinesWithCalcul
141
144
  buyerReference: invoice.buyerReference,
142
145
  paymentMeans: paymentMethod,
143
146
  referenceIdentifiers: referenceIdentifiers,
144
- orderReference: invoice.orderReference,
147
+ orderReference: orderReference,
145
148
  }
146
149
  };
147
150
  if (resp.invoice && resp.invoice.delivery && resp.invoice.delivery === {}) {
148
151
  delete resp.invoice.delivery;
149
152
  }
153
+ if (resp.invoice && resp.invoice.orderReference) {
154
+ delete resp.invoice.orderReference;
155
+ }
150
156
  return resp;
151
157
  };
152
158
  exports.convertToInvoiceMetadataInput = convertToInvoiceMetadataInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unimaze/billing",
3
- "version": "0.12.7",
3
+ "version": "0.12.10",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",