unable to export Jiwa sales orders  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

unable to export Jiwa sales orders

Postby jak » Fri Dec 16, 2016 12:53 am

Hi,

when we were trying to export jiwa sales order to magento, it shows this message in logs,
"Found 0 items in queue 'Jiwa Sales Order"

there are sales order in jiwa, but it doesn't export them to magento store, can you please tell me steps to resolve this.

Thank you,
jak
Occasional Contributor
Occasional Contributor
 
Posts: 22
Joined: Mon Oct 10, 2016 10:00 pm
Topics Solved: 0

Re: unable to export Jiwa sales orders  Topic is solved

Postby Mike.Sheen » Sat Dec 17, 2016 12:28 pm

Hi jak,

the "Export Jiwa Sales Orders" action is used to only send to Magento orders in Jiwa which have shipped.

If you search the plugin code for the method "CreateMagentoShipments" you can see the criteria it uses:

Code: Select all
string SQL = @"SELECT SO_Main.InvoiceNo
            FROM SO_Main
            LEFT JOIN SO_CustomSettingValues order_id_value ON order_id_value.InvoiceID = SO_Main.InvoiceID
            LEFT JOIN SO_CustomSetting order_id ON order_id.SettingID = order_id_value.SettingID
            LEFT JOIN SO_CustomSettingValues shipment_id_value ON shipment_id_value.InvoiceID = SO_Main.InvoiceID
            LEFT JOIN SO_CustomSetting shipment_id ON shipment_id.SettingID = shipment_id_value.SettingID
            JOIN SO_History ON SO_History.InvoiceID = SO_Main.InvoiceID AND SO_History.HistoryNo = SO_Main.CurrentHistoryNo
            WHERE SO_Main.LastSavedDateTime > @JiwaSalesOrdersLastSyncDateTime
            AND order_id.SettingName = @magento_increment_id_SettingName
            AND order_id_value.Contents IS NOT NULL
            AND LTRIM(RTRIM(order_id_value.Contents)) <> ''
            AND shipment_id.SettingName = @magento_shipment_id_SettingName
            AND (shipment_id_value.Contents IS NULL OR LTRIM(RTRIM(order_id_value.Contents)) = '')
            AND SO_History.Status = 5 -- 5 = Delivery
            ORDER BY SO_Main.LastSavedDateTime, SO_Main.InvoiceNo";



The custom field on the sales order "magento_increment_id" must be NOT blank or NULL, and the custom field "magento_shipment_id" must be blank or NULL (that means no shipment created in Magento yet).
The sales order history status must also be set to Delivery (value 5).
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 11 guests