mirror of
https://github.com/n8n-io/n8n.git
synced 2024-08-17 00:50:42 +03:00
fix(Invoice Ninja Node): Fix some fields names (no-changelog) (#9945)
This commit is contained in:
parent
ddfb240694
commit
8ed7db2c1e
@ -178,6 +178,7 @@ export const clientFields: INodeProperties[] = [
|
|||||||
default: {},
|
default: {},
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
|
// TODO: in v2.0, rename to contactsValue
|
||||||
name: 'contacstValues',
|
name: 'contacstValues',
|
||||||
displayName: 'Contact',
|
displayName: 'Contact',
|
||||||
values: [
|
values: [
|
||||||
|
@ -451,11 +451,11 @@ export class InvoiceNinja implements INodeType {
|
|||||||
if (additionalFields.taxName2) {
|
if (additionalFields.taxName2) {
|
||||||
body.tax_name2 = additionalFields.taxName2 as string;
|
body.tax_name2 = additionalFields.taxName2 as string;
|
||||||
}
|
}
|
||||||
if (additionalFields.taxtRate1) {
|
if (additionalFields.taxRate1) {
|
||||||
body.tax_rate1 = additionalFields.taxtRate1 as number;
|
body.tax_rate1 = additionalFields.taxRate1 as number;
|
||||||
}
|
}
|
||||||
if (additionalFields.taxtRate2) {
|
if (additionalFields.taxRate2) {
|
||||||
body.tax_rate2 = additionalFields.taxtRate2 as number;
|
body.tax_rate2 = additionalFields.taxRate2 as number;
|
||||||
}
|
}
|
||||||
if (additionalFields.discount) {
|
if (additionalFields.discount) {
|
||||||
body.discount = additionalFields.discount as number;
|
body.discount = additionalFields.discount as number;
|
||||||
@ -477,11 +477,11 @@ export class InvoiceNinja implements INodeType {
|
|||||||
if (additionalFields.markSent) {
|
if (additionalFields.markSent) {
|
||||||
qs.mark_sent = additionalFields.markSent as boolean;
|
qs.mark_sent = additionalFields.markSent as boolean;
|
||||||
}
|
}
|
||||||
const invoceItemsValues = (this.getNodeParameter('invoiceItemsUi', i) as IDataObject)
|
const invoiceItemsValues = (this.getNodeParameter('invoiceItemsUi', i) as IDataObject)
|
||||||
.invoiceItemsValues as IDataObject[];
|
.invoiceItemsValues as IDataObject[];
|
||||||
if (invoceItemsValues) {
|
if (invoiceItemsValues) {
|
||||||
const invoiceItems: IItem[] = [];
|
const invoiceItems: IItem[] = [];
|
||||||
for (const itemValue of invoceItemsValues) {
|
for (const itemValue of invoiceItemsValues) {
|
||||||
const item: IItem = {
|
const item: IItem = {
|
||||||
cost: itemValue.cost as number,
|
cost: itemValue.cost as number,
|
||||||
notes: itemValue.description as string,
|
notes: itemValue.description as string,
|
||||||
@ -883,8 +883,8 @@ export class InvoiceNinja implements INodeType {
|
|||||||
if (additionalFields.dueDate) {
|
if (additionalFields.dueDate) {
|
||||||
body.due_date = additionalFields.dueDate as string;
|
body.due_date = additionalFields.dueDate as string;
|
||||||
}
|
}
|
||||||
if (additionalFields.quouteDate) {
|
if (additionalFields.quoteDate) {
|
||||||
body.invoice_date = additionalFields.quouteDate as string;
|
body.invoice_date = additionalFields.quoteDate as string;
|
||||||
}
|
}
|
||||||
if (additionalFields.quoteNumber) {
|
if (additionalFields.quoteNumber) {
|
||||||
if (apiVersion === 'v4') {
|
if (apiVersion === 'v4') {
|
||||||
@ -920,11 +920,11 @@ export class InvoiceNinja implements INodeType {
|
|||||||
if (additionalFields.taxName2) {
|
if (additionalFields.taxName2) {
|
||||||
body.tax_name2 = additionalFields.taxName2 as string;
|
body.tax_name2 = additionalFields.taxName2 as string;
|
||||||
}
|
}
|
||||||
if (additionalFields.taxtRate1) {
|
if (additionalFields.taxRate1) {
|
||||||
body.tax_rate1 = additionalFields.taxtRate1 as number;
|
body.tax_rate1 = additionalFields.taxRate1 as number;
|
||||||
}
|
}
|
||||||
if (additionalFields.taxtRate2) {
|
if (additionalFields.taxRate2) {
|
||||||
body.tax_rate2 = additionalFields.taxtRate2 as number;
|
body.tax_rate2 = additionalFields.taxRate2 as number;
|
||||||
}
|
}
|
||||||
if (additionalFields.discount) {
|
if (additionalFields.discount) {
|
||||||
body.discount = additionalFields.discount as number;
|
body.discount = additionalFields.discount as number;
|
||||||
@ -935,11 +935,11 @@ export class InvoiceNinja implements INodeType {
|
|||||||
if (additionalFields.emailQuote) {
|
if (additionalFields.emailQuote) {
|
||||||
body.email_invoice = additionalFields.emailQuote as boolean;
|
body.email_invoice = additionalFields.emailQuote as boolean;
|
||||||
}
|
}
|
||||||
const invoceItemsValues = (this.getNodeParameter('invoiceItemsUi', i) as IDataObject)
|
const invoiceItemsValues = (this.getNodeParameter('invoiceItemsUi', i) as IDataObject)
|
||||||
.invoiceItemsValues as IDataObject[];
|
.invoiceItemsValues as IDataObject[];
|
||||||
if (invoceItemsValues) {
|
if (invoiceItemsValues) {
|
||||||
const invoiceItems: IItem[] = [];
|
const invoiceItems: IItem[] = [];
|
||||||
for (const itemValue of invoceItemsValues) {
|
for (const itemValue of invoiceItemsValues) {
|
||||||
const item: IItem = {
|
const item: IItem = {
|
||||||
cost: itemValue.cost as number,
|
cost: itemValue.cost as number,
|
||||||
notes: itemValue.description as string,
|
notes: itemValue.description as string,
|
||||||
|
Loading…
Reference in New Issue
Block a user