opensourcepos / opensourcepos

Open Source Point of Sale is a web based point of sale application written in PHP using CodeIgniter framework. It uses MySQL as the data back end and has a Bootstrap 3 based user interface.
http://www.opensourcepos.org
Other
3.46k stars 2.19k forks source link

Adding Icon / Link to Sales Manage Page #1749

Closed JackCameo closed 4 years ago

JackCameo commented 6 years ago

Background information

IMPORTANT: If you choose to ignore this issue report template, your issue will be closed as we cannot help without the requested information.

Please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:

Installation information

Issue / Bug / Question / New Feature

I am new to OSPOS, my development skills are a bit rusty but have been able to make small modification with success. This is probably a fairly easy fix but I seem to be having trouble with it. I have duplicated the invoice and created a packing slip, i added the necessary addition in various files and it is all working properly. The issue I am facing is adding an icon with a link to the manage sales page. The only place I am finding related to this is the function "get_sale_data_row" in the table_helper.php. I have added a custom row

$row['packingslip'] = anchor($controller_name."/packingslip/$sale->sale_id", '<span class="glyphicon glyphicon-list-alt"></span>',
        array('title' => $CI->lang->line('sales_show_packinglsip'))
    );

yet it is still not displaying on the manage page for sales. I have of course added the sales_show_packinglsip to the sales_lang.php. Thank you for your time and clarification on the issue.

daN4cat commented 6 years ago

@JackCameo in table_helper.php you need to add something to get_sales_manage_table_headers too:

$headers[] = array('packingslip' => '&nbsp', 'sortable' => FALSE);

Usually the 'edit' is left to the last position so add your icon before or after receipt or even the 'invoice' section.

daN4cat commented 6 years ago

Would be nice if you could share and contribute your work to the project....

JackCameo commented 6 years ago

Thank you, worked perfectly.

I don't mind to share and contribute however I don't believe my additions or modifications would fit properly into the theme of POS as I am using the POS to manage wholesale and retail, my code my not be written wonderfully and I don't know how to contribute on Github - I believe I would need to create a branch and push updates...If you want to share instructions I can give it a try and you can decide if my updates would fit.

daN4cat commented 6 years ago

Simply zip the files you changed and attach them here. Also add any change you made to the database tables structure.

JackCameo commented 6 years ago

I have made a few modifications, let me know if you want me to refactor anything. I have only added to the en-US language, I may add spanish to my modifications but was not intending others. application-12-17-17.zip

JackCameo commented 6 years ago

Is there a way to share privately?

JackCameo commented 6 years ago

application-12-18-17.zip

daN4cat commented 6 years ago

Thanks, I will look into it later.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.