I’m working to add a feature to Quotes Module (see attached image), the idea is to make visible the field cost, and add a field for utility or profit (however you want to call it), in order that you write the cost of your product and the utility as a percentage or as a value. The idea is to make this feature public in order it could be included on SuiteCRM future releases, if the community find it useful.
And as discount or tax fields the list price got calculated according to the cost and utility chosen, e.g.: if cost is 100$ and utility is 30%, list price will be 142,86$, or if cost is 100$ and utility is 30$ the list price will be 130.
I’ve succesfully edited the file line_items.js, now I need to create the fields on the database.
How is the best way to add this fields? Using Studio? or should I just add the field to the table aos_products_quotes?
Thanks for your guidance, is the first time i’m trying to develop a feature to SuiteCRM.
As I’m working on AOS_Products_Quotes module, I don’t see that on ./language/en_us.lang.php the new fields were added, should I add them manually or should I expect that Studio do it for me when I had edited the Line Items module using Studio?
Thanks for your answer, maybe I don’t explain myself properly, I don’t understand all terms and process with github yet, the merge was made to my own fork, so as I understand I’ve made changes on my own machine and upload it to my own fork of SuiteCRM, now I’ve opened a pull request for my changes to be merged to SuiteCRM master branch.
As I understand now SuiteCRM will review my changes, test and if you find it useful and correct it will be merged into the SuiteCRM into a next version.
Thanks, but you’ll need to do some more work on that PR
You shouldn’t be using your master branch, you should sub-branch and work there, to keep things separate. But this is just a matter of your organization of your own repo.
Then you shouldn’t do the PR directed at the master branch of SuiteCRM, but at those other branches I mentioned above.
And you shouldn’t include style.css in your push, it’s SASS generated from changes done in other files.
This is a lot to learn when you’re just starting, but take it step by step and you’ll get there. I will be gone for almost a week now,m but I’m sure Dillon or one of the others in the team will answer your PR asking for these changes.
You should do that to master also, but let’s not do it yet, since you have a commit in master that we want to grab. Let’s make a new sub-branch under develop, called feature-quotes, and put that commit in there.
Now check in GitHub if you have that sub-branch there with your new changes. When you do, you can update master on your origin from upstream.
Now push all local branches up to origin
git push origin
Finally, create a PR on GitHub from that new branch, into SalesAgility/develop. If everything went well there should be no conflicts, and no additional changes showing, apart from the ones in your development work.
After this is done I’ll tell you a few tips to do things more easily the next time.
I couldn’t complete the cherry-pick I got a lot of errors, resolve some, but finally refuses without said why, I suspect that is because the first PR was on 7.9.x, but now we are on 7.10.1, but not sure, so I’ll rather start over with a new branch, do the development and then create a new PR or something like that.
On branch feature-quotes
nothing to commit, working tree clean
D:\Users\Documents\NetBeansProjects\SuiteCRM>git cherry-pick d9831685dd2
Performing inexact rename detection: 100% (1160406/1160406), done.
error: could not apply d9831685d... Calculate list price according to cost and u
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
As I work on this new feature, I need a new dropdown list, I know that I can create dropdow or edit the existing on the Dropdown Editor, but…, as I’m developing a new feature, where or how should I create the new dropdown in order that it also be uploaded with the other changes.
Is there something like the vardefs file to create the dropdown or should I specify the structure of the dropdown when I make the pull request?