Magento News
Invalid qty to invoice item “%s””, by changing the quantity in the invoice
While creating an invoice items programmatically I came across this problem where I could not add item quantity by using a set method for some reason.
I initially had
$item->setQty(11) ...;
But I kept getting an error stating that “Invalid qty to invoice item ”
After several trials, the solution that work is to not use the set method direct and use the generic setData as shown below.
$item->setData(array('qty' => 11)) ...;
In fact I find this later method a more reliable approach and I will now to use it more often.
Any more ideas, please drop a line!
Invalid qty to invoice item “%s””, by changing the quantity in the invoice
Possibly Related Posts:
- Database query different results
- Menu highlight in magento under admin
- magento disable a banner on certain category pages or have a banner with multiple links
- Magento, using ACL for frontend. Possible?
- Magento IE-7 Fix In Windows XP
RSS Feed