migrateOpenTransaction()
ItemisedTransactionDetail migrateOpenTransaction(string openTransactionNumber, string targetAccountUsn)
This method migrates the specified open transaction to another account.
Only compatible accounts are allowed to migrate open transactions. To be compatible, they must have the same account type, currency and GST schedule.
This method only supports transaction types of quote, itemised credit and itemised debit.
Parameters
- openTransactionNumber
- Format: string
- targetAccountUsn
- Format: string
Results
This method returns an ItemisedtransactionDetail XML document that contains details of the migrated transaction.
There are no messages defined by this method.
Example: A returned ItemisedTransactionDetail XML document
This example shows an ItemisedTransactionDetail XML document.
<ItemisedTransactionDetail xmlns="http://xml.inomial.com/smile/2.xsd">
<version>2.0</version>
<transactionType>Quote</transactionType>
<company>1</company>
<usn>2142425111</usn>
<transactionNumber>21446927</transactionNumber>
<currency>AUD</currency>
<amount>108.90</amount>
<accountType>1</accountType>
<gstAmount>9.90</gstAmount>
<salesReportCategory>invoice</salesReportCategory>
<formattedAmount currency="AUD" formatted="$108.90">108.90</formattedAmount>
<formattedGstAmount currency="AUD" formatted="$9.90">9.90</formattedGstAmount>
<unallocatedAmount>108.90</unallocatedAmount>
<formattedUnallocatedAmount currency="AUD" formatted="$108.90">108.90</formattedUnallocatedAmount>
<transactionDate>2016-07-06+10:00</transactionDate>
<openDate>2016-07-06+10:00</openDate>
<quoteNumber>21446927</quoteNumber>
<createdByUsn>2142420831</createdByUsn>
<transactionSource>Manual</transactionSource>
<transactionItem>
<usn>2142425129</usn>
<lineNumber>0</lineNumber>
<itemCode>adsl</itemCode>
<chargeFrom>2016-07-06+10:00</chargeFrom>
<chargeTo>2016-07-06+10:00</chargeTo>
<description>ADSL2 Modem</description>
<quantity>1</quantity>
<currency>AUD</currency>
<amount>99.00</amount>
<isGst>false</isGst>
<chargeGst>true</chargeGst>
<discount>0</discount>
<count>0</count>
<gstAmount>9.90</gstAmount>
<salesReportCategory>hardware</salesReportCategory>
<chargeId>0d8c57c3-5ef3-45c2-bc4e-8e3d541c4283</chargeId>
<location key="1">Head office</location>
</transactionItem>
<transactionItem>
<usn>2142425111</usn>
<lineNumber>1</lineNumber>
<itemCode>gst</itemCode>
<chargeFrom>2016-07-06+10:00</chargeFrom>
<chargeTo>2016-07-06+10:00</chargeTo>
<description>Includes 10% GST</description>
<quantity>1</quantity>
<currency>AUD</currency>
<amount>9.90</amount>
<isGst>true</isGst>
<chargeGst>false</chargeGst>
<discount>0</discount>
<count>0</count>
<gstAmount>0.00</gstAmount>
<salesReportCategory>gst</salesReportCategory>
</transactionItem>
</ItemisedTransactionDetail>
Faults
InvalidRequestExceptionThis fault is returned when:
NoSuchItemException
- the target account USN is not provided
- the target USN is not an account USN
- the open transaction number is not provided
- the transaction with the specified number is not open
- migrating an open transaction of unsupported transaction type
- the target account is incompatible with the account of the open transaction
This fault is returned when:
- the open transaction number does not exist
- the target account USN does not exist
Java client syntax
java -cp build/smilewsv2-client.jar [options]
com.inomial.smile.client.v2.examples.MigrateOpenTransaction
openTransactionNumber targetAccountUsn
- openTransactionNumber
- Purpose: Specifies the number of the open transaction that will be migrated.
- targetAccountUsn
- Purpose: Specifies the account that the open transaction will be migrated to.
Note: For more information about the Java client and the options it
accepts, see Java client syntax.