When I add Vendor Invoice for Product "ABC" shouldn't it add Buying Price for "ABC" directly?

Hello dear @geettanna

Thank you very much for your kind support.

I will try to apply this. And will update you results.

Great work man.

Appreciate it

HI @geettanna ,

Sorry to bother you,

I tired to do as you mentioned but didn’t show any result

Can you attach screenshot of the code? also a file with actual code,
because I’m no expert in codes. I’m not sure where to place the code in the file card.php

Thank you again.

@Hashim,

Attached are the following files:
Folder - htdocs\fourn\commande

  1. card.php
    card.php (182.1 KB)

  2. update_buyprice.php — This is not an defualt file, it has been created.
    update_buyingprice.php (2.6 KB)

Before replacing the card.php file, keep a copy of the old file so you can go back to it in case this does not work or is not as expected.
We have a lot of changes in the file, which also means it might not support each version - currently we are using these files on version 14.0.2 or upgrading will be difficult since you will have to manually check this file and update. We plan on upgrading to 15.0.2 as and when it is available.

My personal recommendation would be to use these files as a reference, but find someone who can help you code this into your current instance. Since there are a lot of things we have changed, many of the functionalities might not work as expected.

A few things I can recall have been attached as screenshots below:

  1. Different Stages of PO

  2. Different Buying Prices on the top of the page when PO is Validated & Yet not ordered. To help with the approval decision.

  3. Since our Reception is significantly controlled, we like to set which warehouse to use when creating a purchase order. Thus, on our purchase order page, each line will show if there is stock available or not, if not then if its default warehouse is defined or not.

There a lot more as I look below, but I think the more you will see customizations, the more it will confuse you. Since we undertook these changes over the past 1 year in almost all the modules, we would recommend a phase wise implementation always.

Since we are not very good with coding, we don’t share a lot of our code, but I believe our changes are very helpful. Some of our changes are excellent for the people in India as we tried to automated statutory tax calculations.

I have attached both the files, but in case that does not help. I will share screenshot for the “Update Buying Price” button code only.

I think we have made so many extra changes as per our requirement, that it might be difficult to share complete files, because I think it might do more harm then good. Since all the changes are linked to other modules, the funcionalities might be distorted due to these add on codes.

Hello @geettanna
i tried it, but not working, may be because i’m running 15.0.1.

Not able to create PO after replacing files.

Thank you for your efforts.

Hi Geettanna,

Your screen shot of purchase order status along with the dates looks impressive. Can you kindly share that code please.

thanks
yesbee.
5ae9cd74e54014f7ebdad5d2fe13519435dc7215_2_690x130

1 Like

@Hashim

Sorry, we plan on upgrading in a few weeks. We have made a lot of changes which are difficult to translate when it is time to upgrade. So we prefer to delay the upgradation process for as long as possible.

But our files should be able to guide anyone who can code.
All you need to ask someone is to use the snippets of the code for the things you need.

Sorry, was not able to help you get this implemented.
Good Luck.

@RiseValInfotech,

Sorry for the late reply.
You can download our file from the response above. My whole file is available.
To explain a little more about the stages of Purchase Order, please find a little more explaination below:

1 - Add an extra field in Purchase Order.

2 - Add stages on PO Page.

If you want to manually handle the change, then make the field visible and change it accordingly.
While we use buttons along with permissions.

If you want to add buttons for better user experience:
3 - Code for buttons. Set persmissions as per your requirement.

They look something like this:

Use the file similar to our internalpoorderstatus_change.php as per your requirement.
internalpoorderstatus_change.php (2.6 KB)

I hope this helps.