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.
You can add them in Studio, but they will be created as Custom fields in a secondary table (the module name + ending in _cstm).
Or you can add them in the Vardefs for the module and then do a Quick Repair and Rebuild (scroll down to the bottom, press button to sync database with vardefs).
The vardefs works, thankyou, I see the new fields created on the database, also I see that new fields were added to the module Line Items on Studio, I edited the labels, because first it appears with the same name of the label on CAPITALS and separeted_by_underscore, so I change this for the correct text that I expect to be displayed on the UI, but I don’t see that changes were reflected on UI, obviously I’ve done quick repair & rebuild twice after changes and also rebuild JavaScript languajes.
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.
I’ve changed the PR to hotfix-7.9.x, but from my master to hotfix-7.9.x, but you said that I should not use my master branch, so how can I move/convert/copy my master to a branch
Now SuiteCRM 7.10.1 was released, and I have new features and changes to add, but I don’t know how to update/synchronize my repo with the latest 7.10.X, and start from there to write the new changes.
I’m not sure if I’d been clear enough, Git is complicated to me.
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.
D:\Users\Documents\NetBeansProjects\SuiteCRM>git status
On branch feature-quotes
nothing to commit, working tree clean
D:\Users\Documents\NetBeansProjects\SuiteCRM>git cherry-pick d9831685dd2
33ccf6b93abfe3f0ac537d4842712
Performing inexact rename detection: 100% (1160406/1160406), done.
error: could not apply d9831685d... Calculate list price according to cost and u
tility values
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'
D:\Users\Documents\NetBeansProjects\SuiteCRM>
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?