I am getting 500 Errors on the “Add Purchase” submission, please see the attached file
- MSAnswered
Hello,
Can you please share the errors in the latest log file
storage/logs/
Thank you
- S(Answered
Please see the attached log file
Attachments - MSAnswered
Hello,
I see the error for undefined key. Please run
php artisan migrate --force
to update the database and then try to add sale again.Thank you
- S(Answered
Still I am getting the error while adding the “Add Purchase”
- MSAnswered
Please check the error log again.
- S(Answered
Please see the attached files
Attachments - MSAnswered
Hello,
I can see the error for
Undefined array key "discount_method"
If you see the line this error generated from that should be$v['discount_amount'] = 'order' == ($v['discount_method'] ?? null) ? (new DiscountAction())->calculate($v['discount'] ?? false, $v['total']) : 0;
Means if not key for
discount_method
then it should fallback tonull
. I suspect that is old error. Please delete the log file and then try add purchase again. If still get error, please attach the new log file.Thank you
- S(Answered
I don’t know what you mean, from the beginning I am getting this error “Undefined array key “discount_method””,
$v[‘discount_amount’] = ‘order’ == ($v[‘discount_method’] ?? null)? (new DiscountAction())->calculate($v[‘discount’] ?? false, $v[‘total’]) : 0;
where is this located?
Attachments - MSAnswered
Hello,
The file is
/home/creati83/public_html/demo.nandalalaenterprises.com/modules/MPS/Services/OrderDataService.php
line 214Thank you
- S(Answered
now it is working fine,
it was $v[‘discount_amount’] = ‘order’ == $v[‘discount_method’] ? (new DiscountAction())->calculate($v[‘discount’] ?? false, $v[‘total’]) : 0;
- Login to Reply