0

i am using this code

$order->setTotalPaid($totamount)->setBaseTotalPaid($totamount); $order->setState('pending_validation','pending_validation', true); $order->save();

to pay the order amount. and also setting order status to Pending Validateion (custom order status).

After this i gose to magento backend and setting its payment validated. and order states gose to processing. then i try to create invoice, its order amount is doubling.

enter image description here

  • Did you find why we have this behaviour and how to fix it ? Thank you. – androniennn May 25 '17 at 10:37
-1

What is the purpose behind manually setting the total paid against the order? The whole concept of an invoice is to mark a payment against the order. This is therefore automatically updating the orders total paid to include the amount the invoice is being raised for, which by default is going to be the full order amount.

You can see this behaviour in Mage_Sales_Model_Order_Invoice::pay.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.