Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wholesale options #2989

Closed
ozzylamberth opened this issue Oct 25, 2020 · 69 comments
Closed

Wholesale options #2989

ozzylamberth opened this issue Oct 25, 2020 · 69 comments

Comments

@ozzylamberth
Copy link

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:

  • [] Reporting an issue of an unmodified OSPOS installation
  • [] Checked open and closed issues and no similar issue was already reported (please make sure you searched!)
  • [] Read README, WHATS_NEW, INSTALL.md and UPGRADE
  • [] Read the FAQ for any known install and/or upgrade gotchas (in specific PHP extensions installed)
  • [] Read the wiki
  • [] Executed any database upgrade scripts if an upgrade pre 3.0.0 (e.g. database/2.4_to_3.0.sql)
  • [] Aware the installation code is in bintray (see README), and GitHub master is for developers only and therefore not complete nor stable

Installation information

  • OSPOS version is:
  • OSPOS git commit hash is:
  • PHP version is:
  • MySQL or MariaDB version is:
  • OS and version is:
  • WebServer is:
  • Selected language is:
  • (If applicable) Docker installation:
  • (If applicable) Installation package for the LAMP/LEMP stack is:

Issue / Bug / Question / New Feature

Please write your issue here. If a bug, please make sure to provide as much information as possible including configuration settings (e.g. Decimals set, Tax mode), language and steps to reproduce the bug.

The version used is opensourcepos.org · 3.3.2 - bb309c.

That such a group in advance I love your project is very functional. I am writing to you because I would like to know how I can show in the sales module the unit price but at the same time the cost price of the items through a dropdown where it indicates Wholesale and retail sale that when selecting wholesale, load the cost price and when selecting retail sale load unit price...

Another idea that occurs to me, although a bit repetitive, is to create a sales module that only charges the cost price when making the sale but I cannot get the system to load the new module, taking into account that I have created the wholesale module in the base data ospos_modules and I have given all the permissions in ospos_permission and copied the sales folder...
for example

2

If you can just give me an idea which file I should modify, I would appreciate it. I have been looking at the system for some time and I have adapted it for my country and at the end I will share the changes to see if it is to your liking since I have made several changes in several sessions

@odiea
Copy link
Collaborator

odiea commented Oct 25, 2020

Did you add the new model to the application/config/autoload.php file? You can open that file and at the bottom see how the other Models are loaded.

@odiea
Copy link
Collaborator

odiea commented Oct 25, 2020

Or you can edit the register view and add the cost_price to that as a readonly.

@ozzylamberth
Copy link
Author

Loading this variable does not allow me to visualize the project. There is another file I need to modify
Uploading as.jpg…

@ozzylamberth
Copy link
Author

For example I created the module but the following happens
cass

at the time of entering this happens

Uploading c222s.jpg…

@ozzylamberth
Copy link
Author

Although repeating a module so that it only takes the cost_price is like flooding the system. although it is the way that has happened while I find out how everything from a drop-down the unit_price and the cost_price. Depending on the sale to be made

@ozzylamberth
Copy link
Author

as
c222s

@odiea
Copy link
Collaborator

odiea commented Oct 25, 2020

It appears that you are missing the , (comma) after it.

@ozzylamberth
Copy link
Author

I thought the same and I added the comma but it remains the same, it is like I need to indicate the call in another place, practically copy the entire path of the sale files to create wholesale, it should show the same screen

@odiea
Copy link
Collaborator

odiea commented Oct 25, 2020

Did you exit then restart the program? That's about all I can suggest.

@ozzylamberth
Copy link
Author

Ok suppose I create a drop-down in the sales interface where I make a query that takes me by default unit_price and for the second query take cost_price I would add it in register.php that would be the only file that I have to modify so the end user would not have the need to navigate between sessions to make sales if not only must select in the same session which one to manage..

Sorry for bothering is that it is the only thing I need to modify and I want to see that option

@odiea
Copy link
Collaborator

odiea commented Oct 25, 2020

You can try that but it would be easier to add the cost price to the Register view and change the price to the cost price

@ozzylamberth
Copy link
Author

ozzylamberth commented Oct 25, 2020

Ok friend solve and I can see the interface of wholesales, I needed to call the file Sales_lib.php now I will make the modifications and I will indicate at the end how I am to be able to carry out wholesale and retail sales

@andriux1990
Copy link
Member

Hello @ozzylamberth .. I have read all the messages and I do not understand very well your logic to have these wholesale and retail prices .. I would like to better understand your plan to do this

@ozzylamberth
Copy link
Author

ozzylamberth commented Oct 26, 2020

Hello, how are you andriux1990? I explain in Venezuela it is common for companies to carry out Wholesale and Retail sales. and the systems have the methodology that the POS has the option of wholesale and retail, automatically taking or changing the prices of the Items from retail price to wholesale price. It is used to not assign a discount to each customer.

@andriux1990
Copy link
Member

Hello, how are you andriux1990? I explain in Venezuela it is common for companies to carry out Wholesale and Retail sales. and the systems have the methodology that the POS has the option of wholesale and retail, automatically taking or changing the prices of the Items from retail price to wholesale price. It is used to not assign a discount to each customer.

I understand now ... what is needed is more fields in the form dialog in the items to store more prices.
this is multiple prices for products.

I did something similar adapting the kits for this. to have several products with different prices and use only one product.

showing the cost price in register would be very easy to do. I'm also thinking of developing a feature for this.

Another easier method that I am thinking of is to create a check for products that have different prices for sales and that can be changed from the sale

@ozzylamberth
Copy link
Author

The development normally goes by the client's demand and this works in this way Supplier Price, Wholesale Price and Unit Price. Since the POS is developed and works with unit_price I would like it to do it also with, for example, wholesale_price..

de

@ozzylamberth
Copy link
Author

It would be great if these options were made in the same Sales module directly in a drop-down with two options Option 1: Retail
Option 2: Wholesale.
Option 1 to take unit_price
Option 2: wholesale_price

@andriux1990
Copy link
Member

Thank you for your interest, in wanting to improve ospos .. I just tell you that you are not the only one working on this feature

@ozzylamberth
Copy link
Author

The important thing is that ideas are contributed and something interesting comes from there. when finished upload the improvements. For example Ospos in the inventory list shows all the quantities regardless of whether they are at zero, I have already made the changes so that I only display the inventory with stock among other changes I only have that one to upload it only that I cannot understand how to tell the drop-down with the two options I put the price I want in the edit of the sale table

@andriux1990
Copy link
Member

Good that you have these changes. OSPOS is the #1 Open Source Point Of Sale

@ozzylamberth
Copy link
Author

This is the file that gives me a headache Sale_lib.php.

line 712 to 756 specifically line 730 ...

if ($ price_mode == PRICE_MODE_STANDARD)
{
$ price = $ item_info-> unit_price;
$ cost_price = $ item_info-> cost_price;
}

How can I tell the Sales ImputText to change from this

$ price = $ item_info-> unit_price;

to this

$ price = $ item_info-> wholesale_price;

by the user's choice through a drop-down select or a checkbox

wholesale_price is a column set in DB as unit_price or cost_price
FR

@izeblood
Copy link

It would be great if these options were made in the same Sales module directly in a drop-down with two options Option 1: Retail
Option 2: Wholesale.
Option 1 to take unit_price
Option 2: wholesale_price

This is what I raised before...long time ago...but nobody wants it...I don't know....

@stale
Copy link

stale bot commented Dec 11, 2020

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.

@stale stale bot added the wontfix label Dec 11, 2020
@odiea
Copy link
Collaborator

odiea commented Dec 13, 2020

Is this Wholesale price always the same percent of cost price markup?

@stale stale bot removed the wontfix label Dec 13, 2020
@midsoft2010
Copy link

I think it would be very nice if someone can develop this because many people like to work with at least to prices. This means retail price is the normal price and wholesale price is lowest price of the products for people buying in bulk for example

@ayieye
Copy link

ayieye commented Jan 29, 2021

has this been solved yet?

@ayieye
Copy link

ayieye commented Jan 29, 2021

i might have something

@midsoft2010
Copy link

midsoft2010 commented Jan 29, 2021 via email

@daN4cat
Copy link
Collaborator

daN4cat commented Feb 7, 2021

Please use elseif otherwise you constantly check mode for any possible value when you know it can be only one of those.

@andriux1990
Copy link
Member

Hello! It works well .. but I feel that it is not good that an employee has all the time the freedom to choose the price he wants to give ..

I think it would be good to assign the multiple prices with user permission control and thus be able to assign the different sales prices to a more trusted employee

@luister1
Copy link

@ayieye hey there..i tried all the steps you've suggested multiple times still couldnt get the register mode(drop down menu)in the sales page to show up the wholesale,retail,van sale modes...i have little to no knoweldge in programming...its an amazing addition to ospos..i really want this addition..would you mind helping me out.

@ayieye
Copy link

ayieye commented Mar 31, 2021

@luister1 what do you have?

@luister1
Copy link

@ayieye i was able to create the fields to enter the wholesale,retail and van sale prices when entering the items however these options cease to show up on the register mode in the sales page
fields
mode

@ayieye
Copy link

ayieye commented Apr 1, 2021

@luister1 what version are you using?
It seems there is a step you missed

@luister1
Copy link

luister1 commented Apr 1, 2021

@ayieye i'm using the 3.3.3 version..
Here are the changes that i've made
1-added the code in controller/sales
2-added unit price 2,3 and 4 in controllers/iotems
3-added unit price 2,3 and 4 in lines 340-343 and 440-443 in helpers/tabular
4-added code for unit price 2,3,4 in views/form
5-added the code in items_lang and sales_lang
6-added unitprice 2,3,4 in the database

@pkiyingi
Copy link

I am using the 3.3.3 version.. But Can not get the drop down values of Register Mode
Here are the changes that i've made
1-added the code in controller/sales
2-added unit price 2,3 and 4 in controllers/iotems
3-added unit price 2,3 and 4 in lines 340-343 and 440-443 in helpers/tabular
4-added code for unit price 2,3,4 in views/form
5-added the code in items_lang and sales_lang
6-added unitprice 2,3,4 in the database

@joshbudu
Copy link

I followed the steps but did not work well. The similar issue others reported. will be nice if these features can work well. wholesale and retail prices

@emushene
Copy link

@ayieye i'm using the 3.3.3 version.. Here are the changes that i've made 1-added the code in controller/sales 2-added unit price 2,3 and 4 in controllers/iotems 3-added unit price 2,3 and 4 in lines 340-343 and 440-443 in helpers/tabular 4-added code for unit price 2,3,4 in views/form 5-added the code in items_lang and sales_lang 6-added unitprice 2,3,4 in the database

Were you able to get the drop downs to work?

@emushene
Copy link

well guys i hope i did not leave anything out . happy coding and be safe

The drop down, I have broken it more than once, doesnt work.

@emushene
Copy link

@joshbudu

Figured it out, debugged by shutting down the entire form piece by piece.

The Image below, this is where you need to change... mine is not perfect as i mixed up the code, but the dropdown is working now and selling with at least two prices.

work on that part Sales_lib.php

I followed the steps but did not work well. The similar issue others reported. will be nice if these features can work well. wholesale and retail prices

image

@joshbudu
Copy link

@emushene
Nice job bro. Working well now. Even though it works the wholesale prices disappears at the items list after refresh. strangely, you can still sell.

@emushene
Copy link

Move the register modes inside your if{block}
image
then checke this function as well

This function is somewhere up here on this thread, mnake sure it looks similar like this, then you will have everything.

image

#3555 then under this add these lines on models/items
'public function search' / models/item:
$this->db->select('MAX(items.unit_price2) AS unit_price2');
$this->db->select('MAX(items.unit_price3) AS unit_price3');
$this->db->select('MAX(items.unit_price4) AS unit_price4');

@joshbudu
Copy link

@emushene
Hello buddy, where can i find 'public function search' / models/item:?

@joshbudu
Copy link

Found it. thank you so much

@andriux1990
Copy link
Member

andriux1990 commented Aug 26, 2022 via email

@emushene
Copy link

you solved? El vie, 26 de ago. de 2022 1:13 p. m., joshbudu @.> escribió:

Found it. thank you so much — Reply to this email directly, view it on GitHub <#2989 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7GVF7RXLQ3SEYSOCKPABTV3EJMHANCNFSM4S6ED4BQ . You are receiving this because you were mentioned.Message ID: @.
>

Yes sir, we have solved it. Thank you very much.

@joshbudu
Copy link

@andriux1990
Saw your solution for different prices for different locations. That will work even better. Can you help?

@joshbudu
Copy link

joshbudu commented Dec 9, 2022

how come i cannot find @ayieye codes for multi pricing here. It was right here. was it removed?

@joshbudu
Copy link

@emushene Hello buddy need your help

@ayieye
Copy link

ayieye commented Dec 19, 2022

@emushene what's up

@joshbudu
Copy link

@ayieye Can I have the codes for the multi pricing? It was here before don't know what happened.

@ayieye
Copy link

ayieye commented Dec 19, 2022

@joshbudu let me check if I still have the project with me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests