I Am Getting 500 Error

0

I am getting 500 Errors on the "Add Purchase" submission, please see the attached file

Attachments
Question Resolved For: Modern Point of Sale Solution 0 Votes 11 Answers 712 Views
Asked by Shibin Mathew (Shenil) 10 months ago

0

Answered by Mian Saleem

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 to null. 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

0

Answered by Mian Saleem 10 months ago

Hello,

Can you please share the errors in the latest log file storage/logs/

Thank you

0

Answered by Shibin Mathew (Shenil) 10 months ago

Please see the attached log file

0

Answered by Mian Saleem 10 months ago

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

0

Answered by Shibin Mathew (Shenil) 10 months ago

Still I am getting the error while adding the "Add Purchase"

0

Answered by Mian Saleem 10 months ago

Please check the error log again.

0

Answered by Shibin Mathew (Shenil) 10 months ago

Please see the attached files

0

Answered by Shibin Mathew (Shenil) 9 months ago

now it is working fine,

it was $v['discount_amount'] = 'order' == $v['discount_method'] ? (new DiscountAction())->calculate($v['discount'] ?? false, $v['total']) : 0;

0

Answered by Mian Saleem 9 months ago

That's strange it should be in the latest update. When did you download the file?

We use Cookies

We use cookies to ensure that we give you the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies.