My Products
Help
Anonymous
Not applicable

supplierInvoice override our accountNumber when using VAT code 08

by Anonymous

Hi!

 

When creating a supplier invoice using VATcode id 08, the account is automatically set to 4910 in Visma.net, despite that the call includes account 4915.

 

we are using this URL request: https://integration.visma.net/API/controller/api/v1/supplierInvoice

 

We are using this JSON:

{

"documentType": {

"value": "Invoice"

},

"hold": {

"value": "false"

},

"supplierReference": {

"value": "2"

},

"date": {

"value": "2021-09-13T21:03:04.035Z"

},

"description": {

"value": "Test 1"

},

"supplierNumber": {

"value": "501692"

},

"currencyId": {

"value": "SEK"

},

"dueDate": {

"value": "2021-09-13T21:03:04.035Z"

},

"paymentMethod": {

"value": "03"

},

"payDate": {

"value": "2021-09-13T21:03:04.035Z"

},

"paymentMessage": {

"value": "Test 1"

},

"invoiceLines": [

{

"operation": "Insert",

"lineNumber": {

"value": 0

},

"transactionDescription": {

"value": "Test"

},

"uom": {

"value": "ST"

},

"costInCurrency": {

"value": 100

},

"accountNumber": {

"value": "4915"

},

"subaccount": [

{

"segmentId": 1,

"segmentValue": "60"

},

{

"segmentId": 2,

"segmentValue": "000000001"

},

{

"segmentId": 3,

"segmentValue": "006000"

},

{

"segmentId": 4,

"segmentValue": "0000"

}

],

"vatCodeId": {

"value": "08"

}

}

]

}

 

Do you know why this happens?

 

/Frida 

 

8 REPLIES 8
Yıldırım
VISMA

by Yıldırım

You should be able to use "Drag and drop here or browse  files to attach" option under the message box below.

2004-Window.png

 

Otherwise, developersupport@visma.com can also be used. 

Yıldırım
VISMA

by Yıldırım (Updated ‎16-09-2021 13:19 by Yıldırım VISMA )

Hello,

we're able to override Account Number(Should be valid and existing in the system), If the selected item type is Non-Stock or no item added to the line in the invoice.

 

Please see the explanation below.

 

1) Supplier > General Ledger Accounts > Expense Account

supplier_acc_def.png

"Expense Accountis the default value for the "Konto-Account" field on the Supplier Invoice.

 

 

2) If the selected item's type is a "Stock" then the "Account" value is read-only and automatically fetched from Inventory > General Ledger Accounts > Expense Account/s

stockitem_acc_def.png

 

 

  1. Make sure  "accountNumber": 4915" is accessible / valid / active in the Financials Company. 
    "Chart of accounts > ScreenId=GL202500"

  2. Create a supplier invoice in the UI with the same values sent via the API, see what default value has been assigned.

  3. Please check the aforementioned points in the UI (Supplier / Inventory GL), try to manually override created supplier invoice's "Line > Account" value in the Financials company.

  4. Send a PUT request to check whether "Account" value can be overridden. 
    {
    	"documentType": {
    		"value": "Invoice"
    	},
    	"invoiceLines": [{
    		"operation": "UPDATE",
    		"lineNumber": {
    			"value": 1    /* to be updated LineNbr */
    		},
    		"transactionDescription": {
    			"value": "ACCOUNT OVERRIDE"
    		},
    		"accountNumber": {
    			"value": "4915"
    		}
    	}]
    }
Anonymous
Not applicable

by Anonymous

Hi!

 

Thanks!

 

Could you perhaps share your JSON that you managed to override the account with?

 

/Frida 

Yıldırım
VISMA

by Yıldırım

Hello Frida, 

 

Here you can see an example POST Supplier Invoice JSON.

{
	"documentType": {
		"value": "Invoice"
	},
	"referenceNumber": {
		"value": "1732"
	},
	"hold": {
		"value": "false"
	},
	"date": {
		"value": "2021-09-24"
	},
	"financialPeriod": {
		"value": "202109"
	},
	"supplierReference": {
		"value": "7788"
	},
	"description": {
		"value": "1900031"
	},
	"supplierNumber": {
		"value": "00005"
	},
	"currencyId": {
		"value": "EUR"
	},
	"creditTermsId": {
		"value": "30"
	},
	"paymentMethod": {
		"value": "2"
	},
	"note": {
		"value": "Test Subaccount"
	},
	"branchNumber": {
		"value": "1"
	},
	"invoiceLines": [{
		"operation": "Insert",
		"lineNumber": {
			"value": 1
		},
		"transactionDescription": {
			"value": "T-Sub"
		},
		"quantity": {
			"value": "1.00"
		},
		"costInCurrency": {
			"value": "57921.34"
		},
		"accountNumber": {
			"value": "4300"
		},
		"vatCodeId": {
			"value": "1"
		},
		"subaccount": [{
				"segmentId": 1,
				"segmentValue": "120"
			},
			{
				"segmentId": 2,
				"segmentValue": "000"
			},
			{
				"segmentId": 3,
				"segmentValue": "00"
			},
			{
				"segmentId": 4,
				"segmentValue": "18001"
			}
		]
	}]
}

 

Anonymous
Not applicable

by Anonymous

Hi again!

 

I have tried using your JSON (just changed accountnumber, supplier and subbaccounts) but we noticed one potential problem. 

 

This is the JSON I used:

 

{
"documentType": {
"value": "Invoice"
},
"referenceNumber": {
"value": "1732"
},
"hold": {
"value": "false"
},
"date": {
"value": "2021-09-24"
},
"financialPeriod": {
"value": "202109"
},
"supplierReference": {
"value": "7788"
},
"description": {
"value": "1900031"
},
"supplierNumber": {
"value": "501692"
},
"note": {
"value": "Test Subaccount"
},
"branchNumber": {
"value": "1"
},
"invoiceLines": [{
"operation": "Insert",
"lineNumber": {
"value": 1
},
"transactionDescription": {
"value": "T-Sub"
},
"quantity": {
"value": "1.00"
},
"costInCurrency": {
"value": "57921.34"
},
"accountNumber": {
"value": "4915"
},
"vatCodeId": {
"value": "08"
},
"subaccount": [{
"segmentId": 1,
"segmentValue": "120"
},
{
"segmentId": 2,
"segmentValue": "000"
},
{
"segmentId": 3,
"segmentValue": "00"
},
{
"segmentId": 4,
"segmentValue": "18001"
}
]
}]
}

 

When we do the POST to a supplier that doesn't have an expense account on them, the call goes as expected and we have no problem getting the account we want on the invoiceLine. But when we do the call to a supplier that has an expense account defined and we want to override that account, it doesn't work. What do we need to to to override the account on the supplier?

 

/Frida 

 

 
 

 

 

 

Yıldırım
VISMA

by Yıldırım

Hello Frida, 

 

  • Could you try manually creating the Supplier Invoice in the Financials UI with the same values to see if the account can be overriden ? 
  • Could you also check what "Account" value is fetched by default as soon as you select the "Supplier" in the UI ? 

 

 

Anonymous
Not applicable

by Anonymous

Is there any way to attach a file? I have a file with the outcome from the testing and explanations and it would be easier if I just could attach the file.

 

/Frida 

Yıldırım
VISMA

by Yıldırım (Updated ‎16-09-2021 11:46 by Yıldırım VISMA )

Hello Frida, 

 

we'll check it out and revert you with information.