I Got Http Error 500 When I Add Sales

0

I got HTTP ERROR 500 when I add sales the list of items please see attached image

Question Resolved For: Stock Manager Advance with Point of Sale Module 0 Votes 10 Answers 515 Views
Asked by Mark Olvido 11 months ago

0

Answered by Mian Saleem 11 months ago

Hello,

Please check your server error logs and let me know the error details. 500 error could be due to many reason and the error logs should have the details.

If you are not sure about server error logs, you can enable app log by chnging the log_threshold to 1 in the app/config/config.php file and the try to add sale again. Laslty check the latest log file in the app/logs/ folder.

Thank you

0

Answered by Mark Olvido 11 months ago

This is the error i found in app/logs

<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>

ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier1_name"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier1_part_no"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier1_price"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier2_name"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier2_part_no"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier2_price"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier3_name"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier3_part_no"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier3_price"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier4_name"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier4_part_no"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier4_price"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier5_name"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier5_part_no"
ERROR - 2023-05-17 23:26:39 --> Could not find the language line "supplier5_price"
ERROR - 2023-05-17 23:28:43 --> More than zero: 3 = 2.0000 + 1.0000 PI: stdClass Object
(
[id] => 13999
[purchase_id] =>
[transfer_id] => 68
[product_id] => 1768
[product_code] => 64643573
[product_name] => SUN ANTI RAD @180
[option_id] =>
[net_unit_cost] => 45.0000
[quantity] => 10.0000
[warehouse_id] => 5
[item_tax] => 0.0000
[tax_rate_id] =>
[tax] =>
[discount] =>
[item_discount] =>
[expiry] =>
[subtotal] => 450.0000
[quantity_balance] => 2.0000
[date] => 2023-03-09
[status] => received
[unit_cost] => 45.0000
[real_unit_cost] => 45.0000
[quantity_received] =>
[supplier_part_no] =>
[purchase_item_id] =>
[product_unit_id] => 2
[product_unit_code] => PC
[unit_quantity] => 10.0000
[gst] =>
[cgst] =>
[sgst] =>
[igst] =>
[base_unit_cost] =>
)

ERROR - 2023-05-17 23:28:43 --> Severity: Warning --> foreach() argument must be of type array|object, bool given /home4/shszmwmy/public_html/testing/pos_testing/app/models/admin/Sales_model.php 723
ERROR - 2023-05-17 23:31:20 --> Severity: error --> Exception: Division by zero /home4/shszmwmy/public_html/testing/pos_testing/app/models/Site.php 72
ERROR - 2023-05-17 23:31:31 --> Severity: error --> Exception: Division by zero /home4/shszmwmy/public_html/testing/pos_testing/app/models/Site.php 72

0

Answered by Mian Saleem 11 months ago

Hello,

The line in error checks the purchase item unit cost and the division in only with the purchase item quantity. I hope you are not added purchase items with 0 quantity.

Thank you

0

Answered by Michael Alonzo 10 months ago

Hello,

Any solution or where to find the error?

Thank you

0

Answered by Mian Saleem 10 months ago

Michael Alonzo You can check the server error logs. If you are not sure, you can enable the app logs by changing the log_threshold to 1 in the app/config/config.php and the try again to produce errors. Lastly check the latest file in the app/logs/ folder. Thank you

0

Answered by Michael Alonzo 10 months ago

Hello, This is the error that appears to me:

ERROR - 2023-05-30 00:25:09 --> Severity: error --> Exception: Division by zero /home/syuqxut00r1a/public_html/luissana.awsclientes.com/app/models/Site.php 72

Thank you

0

Answered by Michael Alonzo 10 months ago

Hello,

The error appeared when changing the costing method from: AVCO to FIFO.

Some products were oversold, any solution please?

Thank you

0

Answered by Mian Saleem 10 months ago

Michael Alonzo Hello,

I am not sure, let me check. Do you have any steps to replicate this?

Thank you

0

Answered by Michael Alonzo 10 months ago

Hello,

Previously, I had the AVCO costing method and I made several sales with oversales (in this case without having inventory in the products).

Then I changed the costing method to FIFO and that is where the error message sent previously appears.

I already tested on your online demo but I'm not sure what version you have in the demo because the error that I'm getting is not showing, I'm using the latest version 3.5.0.

Thank you

0

Answered by Mian Saleem 10 months ago

Hello,

The demo was 3.5.0, I have just updated it to 3.5.1 with fixes to transfer and product report issue.

@Michael Alonzo Please ask new question as I would need some private info to test this.

Thank you

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.