Creator Help

Create Expense

Overview

The Deluge task zoho.invoice.createExpense() will create an expense in your Zoho Invoice account with the required values.

Deluge syntax

<Inv Response> = zoho.invoice.createExpense(<key:value>

where,
<Key> refers to the name to be specified as the map key for each key:value pair. The key names must be the same name as given below.
<value> is the value specified for a given key.
<Inv Response> is the map variable returned by Zoho Invoice as response.

Key names to create a customer

  • CategoryName - Mandatory
  • ExpenseDate - If not specified, current date is taken as expense date
  • ExpenseAmount - Mandatory
  • ExpenseDescription
  • Tax1Name
  • IsInclusiveTax - If not specified, default value is false
  • IsBillable - If not specified, default value is false
  • Reference
  • CustomerID - Mandatory, if IsBillable is true
  • CurrencyCode - If not specified, base currency is taken
  • Exchange Rate - If not specified, default value is 1.

Example

expenseInfo = { "CategoryName" : "Marketing", "ExpenseDate" : zoho.currentdate, "ExpenseAmount" : 1000, "ExpenseDescription" : "Online Marketing related expense",
"IsInclusiveTax" : true, "IsBillable" : true, "Reference" : "Ref-1", "CustomerID" : "141995000000022001", "CurrencyCode" : "USD", "ExchangeRate" : 10 };

resp = zoho.invoice.createExpense(expenseInfo);

Response format

{"Tax1Amount":"0.000","CreatedTimeInMillis":"1331721442183","CategoryName":"Marketing","CreatedTime":
"2012-03-1416:07:22IST","ExpenseID":"141995000000069049","CurrencyCode":"USD","CustomerName":"test",
"ExpenseAmount":"1000.00","ExpenseStatus":"0","IsInclusiveTax":"1","SubTotal":"1000.000","ExchangeRate":
"10.000000","ExpenseDate":"2012-03-14","ExpenseDescription":"Online Marketing related expense","CustomerID":
"141995000000022001","Reference":"Ref-1","LastModifiedTime":"2012-03-14 16:07:22IST","IsBillable":"1","Total":
"1000.000"}

Related Links

http://www.zoho.com/invoice/api/expenses.html#how-do-i-add-an-expense?

Top