Forums / Addon Admin Tools / All Invoices Report [support]

All Invoices Report [support]

Views: 21,183

Results 21 to 40 of 84
15 Apr 2014, 5:51 PM
#21
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

All Invoices Report [support]

It'll be a small edit to /YOUR_ADMIN/includes/templates/tpl_all_invoices.php (for the invoices). Locate the lines that read:

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<?php

$sql = "SELECT orders_id FROM ".TABLE_ORDERS." WHERE orders_status = ".$orderStatus;
$pending_orders = $db->Execute($sql);

while (!$pending_orders->EOF) {

and make the following changes:

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<?php

$sql = "SELECT orders_id FROM ".TABLE_ORDERS." ORDER BY orders_id DESC";
$pending_orders = $db->Execute($sql);

while (!$pending_orders->EOF) {

That will select ALL the orders from your store and print them in descending order-id order.

17 Apr 2014, 8:23 PM
#22
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: All Invoices Report [support]

How do I make the admin/all_invoices.php select both pending and processing statuses at the same time? Ideally this would just be a default setting. Delivered and updated don't even matter to me. But I do need to see pending and processing on the same report simultaneously.

Thank you.

17 Apr 2014, 8:58 PM
#23
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: All Invoices Report [support]

southshorepizza:

How do I make the admin/all_invoices.php select both pending and processing statuses at the same time? Ideally this would just be a default setting. Delivered and updated don't even matter to me. But I do need to see pending and processing on the same report simultaneously.

Thank you.
Make a change similar in nature to the change I identified in post #21:

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<?php

$sql = "SELECT orders_id FROM ".TABLE_ORDERS." WHERE orders_id IN (1,2) ORDER BY orders_id DESC";
$pending_orders = $db->Execute($sql);

while (!$pending_orders->EOF) {
17 Apr 2014, 10:02 PM
#24
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: All Invoices Report [support]

That didn't work due to a typo but it set me on the right path. Here is the fix in case anyone else is ever interested.

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<?php

$sql = "SELECT orders_id FROM ".TABLE_ORDERS." WHERE orders_status IN (1,2) ORDER BY orders_id DESC";
$pending_orders = $db->Execute($sql);

while (!$pending_orders->EOF) {
17 Apr 2014, 10:35 PM
#25
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: All Invoices Report [support]

Sorry 'bout that!:blush: I'm glad I was able to point you in the right direction.

17 Apr 2014, 10:46 PM
#26
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: All Invoices Report [support]

This isn't really doing what I need it to do. On the admin/all_invoices.php how could I make the drop down box give me all statuses or mutliple statuses? I have the template_all_invoices.php to refresh and I can clear them off when orders are complete. However when a new order comes in with a status different than the one chosen on admin/all_invoices.php it will not show up automatically.

I tried duplicating the array but that didn't work. Another report (sales report) has a similar feature where status "doesn't matter" I haven't figured out how to make that work though.

18 Apr 2014, 6:04 PM
#27
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: All Invoices Report [support]

southshorepizza:

This isn't really doing what I need it to do. On the admin/all_invoices.php how could I make the drop down box give me all statuses or mutliple statuses? I have the template_all_invoices.php to refresh and I can clear them off when orders are complete. However when a new order comes in with a status different than the one chosen on admin/all_invoices.php it will not show up automatically.

I tried duplicating the array but that didn't work. Another report (sales report) has a similar feature where status "doesn't matter" I haven't figured out how to make that work though.
Perhaps if you'd describe the problem you're trying to solve (i.e. what you "need it to do"), I could either suggest an alternate plugin or a quick change to All Invoices that would provide you with a solution.

18 Apr 2014, 6:18 PM
#28
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: All Invoices Report [support]

I need a monitor in the kitchen to make orders from. So I've been trying to design a program to put all orders on the screen and clear them as they are completed instead of waiting on a printer. I redesigned your template to show only what I wanted on the "report" you made which is now my monitor screen. Then had some help adding ajax to clear the order when it was made. A meta refresh kept it active until all orders of the status selected were cleared. Then it reverted to the select status screen. A meta refresh there allowed any new orders under that status to automatically reappear on the screen. The problem I had is orders came in with two statuses. Your report only allowed one status at a time. The solution I have now puts a checkbox not a drop down list. Now you can select several statuses at once.

<?php
//$statuses_array = array();
$statuses = $db->Execute("select orders_status_id, orders_status_name
                          from " . TABLE_ORDERS_STATUS . "
                          where language_id = '" . (int)$_SESSION['languages_id'] . "'
                          order by orders_status_id");

while (!$statuses->EOF) {
  echo '<label>' . zen_draw_checkbox_field('status_'.$statuses->fields['orders_status_id'], $statuses->fields['orders_status_id'], (($statuses->fields['orders_status_id'] == 1 || $statuses->fields['orders_status_id'] == 2) ? true : false)) . ' ' . $statuses->fields['orders_status_name'] . '</label>';
  /*$statuses_array[] = array('id' => $statuses->fields['orders_status_id'],
                            'text' => $statuses->fields['orders_status_name'] . ' [' . $statuses->fields['orders_status_id'] . ']');*/
  $statuses->MoveNext();
}
echo zen_draw_hidden_field('action', 'list');
//echo zen_draw_pull_down_menu('status', $statuses_array);

?>

Attachment 13997
I continue to be amazed at how zen-cart can be adapted to fit the needs of users that were probably never even thought of at the beginning of the project. It works so well universally in filling individual and specific needs.

Thank you to all!

18 Apr 2014, 6:47 PM
#29
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: All Invoices Report [support]

Cool! That's a neat solution.

6 Jul 2014, 3:23 AM
#30
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: All Invoices Report [support]

lat9:

v2.1.0 is now available in the Plugins: http://www.zen-cart.com/downloads.php?do=file&id=1083

Hi,

I am still on version 1.1 of this plugin because I am still running ZenCart 1.39h. I would love to have the print all packing slip functionality. Would the 1.1 code be easy to modify to allow for printing of all packing slips? Any help is greatly appreciated... thanks!

6 Jul 2014, 11:58 AM
#31
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: All Invoices Report [support]

lolwaut:

Hi,

I am still on version 1.1 of this plugin because I am still running ZenCart 1.39h. I would love to have the print all packing slip functionality. Would the 1.1 code be easy to modify to allow for printing of all packing slips? Any help is greatly appreciated... thanks!
Taking a quick look at the code, there are no core file overwrites and I check before using the v1.5.0+ functions. The code should work, it just won't integrate into your v1.3.9h admin's menu structure so you'll need to enter its address directly into your browser:

yourhost.com/YOUR_ADMIN/all_invoices.php
yourhost.com/YOUR_ADMIN/all_packingslips.php

If it doesn't work in a ZC 1.3.9h environment, just remove the files copied (the full file list is in the readme).

6 Jul 2014, 5:59 PM
#32
lolwaut avatar

lolwaut

Zen Follower

Join Date:
Dec 2010
Posts:
142
Plugin Contributions:
0

Re: All Invoices Report [support]

lat9:

Taking a quick look at the code, there are no core file overwrites and I check before using the v1.5.0+ functions. The code should work, it just won't integrate into your v1.3.9h admin's menu structure so you'll need to enter its address directly into your browser:

yourhost.com/YOUR_ADMIN/all_invoices.php
yourhost.com/YOUR_ADMIN/all_packingslips.php

If it doesn't work in a ZC 1.3.9h environment, just remove the files copied (the full file list is in the readme).

Thanks a bunch! The new versions notes said it was strictly for 1.5 so I was worried that the code was drastically different. I'm happy to hear that isn't the case!

I got this 2.1 version working on my 1.39h install flawlessly. I managed to add the menu items for it by including this file:

/admin/includes/boxes/extra_boxes/all_invoices_reports_dhtml.php

  $za_contents[] = array('text' => BOX_ALL_INVOICES, 'link' => zen_href_link(FILENAME_ALL_INVOICES, '', 'NONSSL'));
  $za_contents[] = array('text' => BOX_ALL_PACKINGSLIPS, 'link' => zen_href_link(FILENAME_ALL_PACKINGSLIPS, '', 'NONSSL'));

Thank you!

6 Jul 2014, 7:23 PM
#33
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: All Invoices Report [support]

You're welcome! I'm glad you got it working ... menus and all.

13 Aug 2014, 4:21 PM
#34
axeman avatar

axeman

New Zenner

Join Date:
Dec 2013
Location:
Southampton, UK
Posts:
51
Plugin Contributions:
0

Re: All Invoices Report [support]

Hi. I am having an issue with invoices not printing 1 per page and no page break. I am running the following:

Windows 7
IE 11
ZC Version 1.5.1

Everything was fine until I upgraded to IE 11. Is there something that needs to be updated or code altered for IE 11? The functions work correctly in all other browsers.
I would prefer to sort this out for IE 11 as we use this for all other site functions.

13 Aug 2014, 6:16 PM
#35
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: All Invoices Report [support]

I'm not seeing the IE11 issue. When printing the invoices, each new invoice starts on a new page (same configuration: IE11, Win7, ZC 1.5.1).

14 Aug 2014, 2:14 AM
#36
axeman avatar

axeman

New Zenner

Join Date:
Dec 2013
Location:
Southampton, UK
Posts:
51
Plugin Contributions:
0

Re: All Invoices Report [support]

Any ideas? Only seemed to happen when I upgraded to IE11.

14 Aug 2014, 12:38 PM
#37
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: All Invoices Report [support]

Like I said, I can't reproduce the issue running IE11 (11.0.9600.17207).

9 Sep 2014, 1:14 PM
#38
herg avatar

herg

New Zenner

Join Date:
Mar 2014
Location:
United States
Posts:
9
Plugin Contributions:
0

Re: All Invoices Report [support]

Axeman:

Hi. I am having an issue with invoices not printing 1 per page and no page break. I am running the following:

Windows 7
IE 11
ZC Version 1.5.1

Everything was fine until I upgraded to IE 11. Is there something that needs to be updated or code altered for IE 11? The functions work correctly in all other browsers.
I would prefer to sort this out for IE 11 as we use this for all other site functions.

I am having the same issue, but in my case, it doesn't seem to matter whether I'm using IE11, Chrome, etc., and it happens on multiple different PCs. I'm wondering if I messed up something in the addon installation.

9 Sep 2014, 2:44 PM
#39
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: All Invoices Report [support]

/templates/tpl_all_invoices.php has a div style around line 270. This must be coded correctly for your browser type and version. If you upgraded to a new version of ie and it stopped working than the code isn't supported by the new browser. Add the code for your particular browser into that line.

9 Sep 2014, 5:17 PM
#40
herg avatar

herg

New Zenner

Join Date:
Mar 2014
Location:
United States
Posts:
9
Plugin Contributions:
0

Re: All Invoices Report [support]

southshorepizza:

/templates/tpl_all_invoices.php has a div style around line 270. This must be coded correctly for your browser type and version. If you upgraded to a new version of ie and it stopped working than the code isn't supported by the new browser. Add the code for your particular browser into that line.

Thanks. That led me to a solution for my case. It may not be the preferred solution, but moving the style into the <table> tag works for me:

<table style="page-break-after: always;" border="0" width="100%" cellspacing="0" cellpadding="2">