Jump to content

Recommended Posts

Hello every one,

 

I use Prestashop 1.6 with the B2B Features.

 

When I want to use the Outstanding page, I get a PrestashopException page:

[PrestaShopException]

object Order can't be loaded
at line 139 in file controllers/admin/AdminOutstandingController.php

133. 		$order_invoice = new OrderInvoice($id_invoice);
134. 		if (!Validate::isLoadedObject($order_invoice))
135. 			throw new PrestaShopException('object OrderInvoice can\'t be loaded');
136. 		$order = new Order($order_invoice->id_order);
137. 		if (!Validate::isLoadedObject($order))
138. 			throw new PrestaShopException('object Order can\'t be loaded');
139. 		$customer = new Customer((int)$order->id_customer);
140. 		if (!Validate::isLoadedObject($order_invoice))
141. 			throw new PrestaShopException('object Customer can\'t be loaded');
142. 
143. 		return '<b>'.Tools::displayPrice($customer->getOutstanding(), Context::getContext()->currency).'</b>';

    AdminOutstandingControllerCore->printOutstandingCalculation - [line - ] - [2 Arguments]
    call_user_func_array - [line 307 - classes/helper/HelperList.php] - [2 Arguments]
    HelperListCore->displayListContent - [line 150 - classes/helper/HelperList.php]
    HelperListCore->generateList - [line 1967 - classes/controller/AdminController.php] - [2 Arguments]
    AdminControllerCore->renderList - [line 1755 - classes/controller/AdminController.php]
    AdminControllerCore->initContent - [line 180 - classes/controller/Controller.php]
    ControllerCore->run - [line 373 - classes/Dispatcher.php]
    DispatcherCore->dispatch - [line 54 - admin/index.php]

Anyone knows a solution?

 

Thank You,

 

Jaivy

 

Edit:

Forge PSCFV-12179

Edited by JaivyDaam (see edit history)
Link to comment
Share on other sites

Ok so here so this is the problem.

 

When you delete orders the generate invoices stays. Using the outstanding page, it tries to collect orders from invoice that doesn't excist anymore.

Click on the [2 Arguments] on this lines, told me about which invoice it was.

AdminOutstandingControllerCore->printOutstandingCalculation - [line - ] - [2 Arguments]

 

So i deleted all of the ghost invoices and it working :)

 

(Better keep my hands off the database :P)

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...