Skip to content Skip to sidebar Skip to footer

Create Invoice Method Is Not Working Properly Of Magento Api

I am trying to create sales order Invoice using Magento API in android application using XMLRPC.I am using the method 'sales_order_invoice.create' for creating invoice.This method

Solution 1:

FYI

when you call the API sales_order_invoice.create, you must assign the array pointer name.

String qty_ordered =(String)itemlist.get("qty_ordered");
                 String qty_invoiced=(String)itemlist.get("qty_invoiced");
                 Object[] methodParams1 = newObject[]{"100000028",itemids,qty};

try to var_dump the methodParams1 with

methodParams1.toString();

it must be same with

array(
      'orderIncrementId' => '200000008', 
      array(
            'order_item_id' => '11', 
            'qty' => '1'
      )
);

because this is the way to put the parameter to sales_order_invoice.create

$result = $client->call(
    $session,
    'sales_order_invoice.create',
    array('orderIncrementId' => '200000008', array('order_item_id' => '11', 'qty' => '1'))
);

Post a Comment for "Create Invoice Method Is Not Working Properly Of Magento Api"