Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit abe348e

Browse files
authored
Merge pull request magento#1147 from gdoug-guidance/patch-2
Update the orderItemIdQty Def
2 parents 6419857 + a8c61b0 commit abe348e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

guides/m1x/api/soap/sales/salesOrderInvoice/sales_order_invoice.create.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ <h5><a name="sales_order_invoice.create-RequestExampleSOAPV1"></a>Request Exampl
122122
$result = $client-&gt;call(
123123
$session,
124124
'sales_order_invoice.create',
125-
array('orderIncrementId' =&gt; '200000008', array('order_item_id' =&gt; '15', 'qty' =&gt; '1'))
125+
array('orderIncrementId' =&gt; '200000008', array('15' =&gt; '1', '16' =&gt; '1'))
126+
// orderItemIdQty Array is Keyed with Order Item ID, with Value of qty to invoice
126127
);
127128
var_dump ($result);
128129

@@ -139,9 +140,10 @@ <h5><a name="sales_order_invoice.create-RequestExampleSOAPV2"></a>Request Exampl
139140
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary
140141

141142
//Create invoice for order
142-
$qty = array(
143-
    array('order_item_id' =&gt; '15', 'qty' =&gt; '1')
144-
);
143+
144+
// orderItemIdQty Array is Keyed with Order Item ID, with Value of qty to invoice
145+
$qty = array('15' =&gt; '1', '16' =&gt; '1');
146+
145147
$invoiceIncrementId = $proxy-&gt;salesOrderInvoiceCreate(
146148
$sessionID,
147149
'200000008',
@@ -162,7 +164,7 @@ <h5><a name="sales_order_invoice.create-RequestExampleSOAPV2%28WSIComplianceMode
162164

163165
$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey'));
164166

165-
$result = $proxy-&gt;salesOrderInvoiceCreate((object)array('sessionId' =&gt; $sessionId-&gt;result, 'orderIncrementId' =&gt; '200000008', 'itemsQty' =&gt; array('order_item_id' =&gt; 15, 'qty' =&gt; '1'), 'comment' =&gt; null,
167+
$result = $proxy-&gt;salesOrderInvoiceCreate((object)array('sessionId' =&gt; $sessionId-&gt;result, 'orderIncrementId' =&gt; '200000008', 'itemsQty' =&gt; array('15' =&gt; '1', '16' =&gt; '1'), 'comment' =&gt; null,
166168
'email' =&gt; null,
167169
'includeComment' =&gt; null
168170
));

0 commit comments

Comments
 (0)