API V3 CustomSalesTax - intuit-partner-platform

I am currently testing V3 of the API with QBO.
Creating an invoice that includes tax is fine if the TxnTaxDetail includes a TxnTaxCodeRef that exists in QBO.
However I noticed when pulling the list of tax codes from QBO that there is a special one called CustomSalesTax.
Can this CustomSalesTax be used to add a custom sales tax to an invoice ?. For instance, I'd supply the TotalTax = 1000, TaxLine.Amount=1000, TaxLine.TaxLineDetail.PercentBased=false in order to add 1000 of tax to the invoice.
Thanks
Fernando

CustomSalesTax is a special id that represents the old US tax model. So this can be used to update any old transactions that are tied to old US tax model. Cannot create new transactions using this CustomSalesTax.
Thanks

Related

Magento 2 rest order API show duplicate sku in order item if product is configurable

I am getting Magento 2 order details by rest order API but the result is showing the same SKU in configured product order item that is creating an issue in SAP integration.
Anyone let me know how can we overwrite Magento 2 rest API code?
You should not need to “overwrite magento 2 rest API code” because what you described is perfectly normal and expected.
In Magento orders, each configurable product creates two sales order line items due to the way that configurable product data is structured in the catalog. One line corresponds to the “parent” catalog product, and one corresponds to the specific variant “child” (simple) product. Both records contain the same SKU value but their product IDs are different.
In order to get all information about the ordered item both of those records could be important, however if you can get by with just the data from the simple product then you could filter your REST request like below:
GET <host>/rest/V1/orders/items?
searchCriteria[filter_groups][0][filters][0][field]=order_id&
searchCriteria[filter_groups][0][filters][0][value]=1&
searchCriteria[filter_groups][1][filters][0][field]=product_type&
searchCriteria[filter_groups][1][filters][0][value]=simple

why is it that WooCommerce REST API returns total orders 0 for a customer but has 1 order for that customer in order table?

I am working on WooCommerce REST API. I am fetching customers and orders. I want to know how WooCommerce calcluates total number of orders as for some customers it is returning less results than the record found in orders table. Is there any issue with API?
here is the customer table result: Customer Table
here is the order table
Orders Table. Sorry stack overflow only allows me to add links of the images.
BTW you can clearly see that customer has one order but in customer table, it shows 0 orders, this data is returned by woocommerce rest api, so there is no chance of error from me. I can't add full image of DB due to some privacy issue and company rules.

Need list of cancelled/voided/deleted transactions

I have an ETL set up to pull SalesReceipts, Invoices, and CreditMemos into our own data warehouse. However, if a transaction in the past has been voided/deleted this will cause our numbers to be off. I have not found a way to get a list of invalidated transactions and I'd prefer not to have to pull all transactions for all time for each invocation of the ETL.
More details:
Our data is in QBO and I am using the Java API provided by Intuit.
I have reviewed the API (both the online endpoint API as well as the Java API) and I have not found much to work with.
Here is an example of a query for Invoice data:
<page loop>
{
Invoice invoice = GenerateQuery.createQueryEntity(Invoice.class);
String query = select($(invoice)).skip(page * PAGE_SIZE).take(PAGE_SIZE).generate();
QueryResult result = dataService.executeQuery(query);
for (IEntity entity : result.getEntities())
{
Transaction t = (Transaction) entity;
System.out.println(t.getStatus());
}
}
However I never encounter any of our cancelled/voided/deleted transactions with this query and the transaction status may not be used in the where filter.
EDIT #2
I believe I have found what I need in the Change Data Capture service.
https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/020_key_concepts/00600_changedata_operation
Some code:
List<IEntity> entities = new ArrayList();
entities.add(new SalesReceipt());
entities.add(new Invoice());
entities.add(new CreditMemo());
List<CDCQueryResult> cresult = dataService.executeCDCQuery(entities, "2011-12-01T00:00:00Z");
...
This will return all transactions that have changed (modified, added, deleted) since the date specified, though what's VERY odd to me is that if I use the date string "2011-12-01T0:0:0Z" I get only transactions with the DELETED state.
For reference:
"2011-12-01T00:00:00Z": all added, modified, deleted transactions.
"2011-12-01T0:0:0Z": only deleted transactions.
Thanks
Preston,
If you are using QuickBooks Desktop you need to use the QBXML SDK v13 to access transactions, if you are using QuickBooks Online you can use QBO v3 REST API.
QBO:
https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services
QBD:
https://developer.intuit.com/docs/0250_qb
regards,
Jarred

grabbing parent records in sugarcrm

what I have done? and what I need?
I have created two module 1.invoice 2. payment there is one to many relationship between invoice and payment
it means one invoice have many payment.
for calculating payment I have used a logic hook in payment module.
now I want invoice_id in payment module to retrive data.
for that I use
$invoice = new invoi_invoice();
$invi = $invoice->get_linked_beans('invoi_invoice_t_hotel_payment_1','invoi_invoice');
var_dump($invi);
it return
array(0){
}
and also I used
$invoice = new invoi_invoice();
$id=$invoice->retrieve($bean->invoi_invoice_t_hotel_payment_1invoi_invoice_ida);
but this also does not give me id of invoice.
i have read lots of blog and tutorial all are grabing parent record same like me.
but I don1t get id till now.
any help please..
I got the solution
for simply getting the parent id use
var_dump($_REQUEST);
then you got parent id like this:-
$parent_id=$_REQUEST["return_id"];

Getting multiple invoices from intuit anywhere api at once

When I update an invoice in QB (after its been changed in my system), I want to avoid updating anything that the user has modified in QB. My plan was to use the filter API method and filter by Ids to get the list of invoices from QB that my app created. However, it doesn't look like InvoiceFilter accepts ListIdSet. It does have a TransactionIdSet, but I can't find a way to get ahold of that number (i.e., the TransactionId) via Data Services. It's certainly not in the response when invoices are read. So, how do I query for a specific set of invoices via the API?
The transaction id refers to the id of the invoice here.
For eg, the following invoice query will retrieve the invoice with Id 4 -
<InvoiceQuery xmlns="http://www.intuit.com/sb/cdm/v2">
<TransactionIdSet>
<Id idDomain="QB">4</Id>
</TransactionIdSet>
</InvoiceQuery>