Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Invoice Number Prefix


Guest

Recommended Posts

Posted

I am looking to add a prefix to the invoice number but am not sure of the code necessary to accomplish this. I presume, for consistency I would have to do likewise to the Packing Slip. How and where would I code this in invoice.php so the font would show up as follows:

 

Invoice Number:[red]40423-[/red]12345(being the db generated invoice number!

 

Thanks you for your help.

Posted

you can find the special contribution which will enable the prefix to the invoice number.

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Posted

Unfortunately those contributions have a "floating prefix" The way our accounting works is with a static prefix based on series to differentiate departments and groups. What I need to do is actually have the Prefix in the text portion of the invoice followed by the ascending number delivered from the db.

Thanks for the try though!

Posted

If this the the invoice.php code I suspect this is where the db deposits the invoice number

 

  osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2007 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_CLASSES . 'currencies.php');
 $currencies = new currencies();

 $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
 $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");

 include(DIR_WS_CLASSES . 'order.php');
 $order = new order($oID);

 

If that is the case, then how do I go about inserting a fixed prefix in red just before the db generated invoice number?

Posted

The actual invoice number is not shown on a standard invoice. If your invoices do show the number then they have been amended by you (or someone else).

 

<p>Invoice Number: <font color="red">40423-</font><?php echo $HTTP_GET_VARS['oID']; ?></p>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...