Epicor 10 How can I add UserID to Quote Entry? - customization

Epicor 10.2 user
New to this ! There is no UserID field in Quote that I could find. I want to add this to the summary page so my admins can keep track of who entered which quote, despite the territory.
I've added a UD text box to Opportunity/Quote Entry. How do I link the current user to that field and auto-populate when a new quote is created?
Really not sure where to start !
please help !

I use the QuoteDtl_ChangedBy field to print the user ID on reports.

Related

How to simplify phone_number field update Process in django including verification

Problem Description:
We have a User model where Phone number is been set as username and its unique=True,
We also have a field where to represent verified/unverified users. And we verify users by OTP verification to phone number. So now we need to add a new feature where user can replace his phone_number and then he will go to verification process and then we will change his number.
And also We need to preserve his previous number (which he already verified) until this new number is verified.
If for some reason user decides to go back without verification we delete newly added number and keeps his old number as username.
So what would be the best way to approach this problem
What I'm considering to have another Model linked with ForeignKey to User
class AlternativeNumber(models.Model):
user = User() # forignkey
number = Charfield
is_verfied = BooleanField
So we will be verifying users number and replacing his original number from his alternativenumber_set
Do you think we can simply it more. Do you think it might have some flaws or we go with a better appraoch ? thanks.
In my opinion you can add two new fields to the User class
alternative_number = CharField
is_aletrnative_verfied = BooleanField
which is really similar to your approach, but it is simpler because all the data is in one table. if a user did not verify his number then you can create a cron job that checks if the is_aletrnative_verfied and if it was false then delete whatever value is in the alternative_number just for the data to be consistent.
Hope you find this helpful!

Add product field to cart opencart

In opencart, at success page, i need to check product's specific field value to take an action. Specifically field: stock_status_id.
WHen i use
$this->cart->getSubTotal()
and
$this->session->data['order_id']
i can get sku, name, category, price, quantity fields but when i try to get stock_status_id field using this code:
$product['stock_status_id']
i don't get anything. I opened system/library/cart.php file and added to data array stock_status_id with no success.
Any help is appreciated!
Found it! Its in system/library/cart.php look for:
$this->data[$key] = array
and add a line with the field you want to bring!

Django store the original value of a field

I am a newbie with Django trying to create a dashboard application reporting on some key milestone dates. I want to be able to track how the key dates are changing. For example:If the kick off date has been changed 5 times I want to be able to report 1. the first date entered, 2. Current date, 3. The date before the last update.
Thank you
Your question is not clear. But for the logic you have asked one thing we can do is to make a model in which the edited dates and user will be fields. Use user as foreign key of your User model. I will just give an example model.
class Dates(models.Model):
event = models.ForeignKey(Event)
date = models.DateField()
This is a very basic method which i am saying. This is a bit complex and you will have to check if the field has changed five times and all.
For a better answer please make the question clear.

change sequence vtiger basic field in contact add form

I want that field should enter first and then other field . i am try through move the location in edit layout option and save the sequences. but when i click on add contact the set sequence not view in create contact form.
can you guide thee process for change the sequences of basic field .
Thanks & regards
Nitesh Shah
if you are not bale to change the field order from layout editor, then change the value of column "sequence" in vtiger_field table

Default django field value when creating from record that is being created

I have People app. I have Person model that has username field. When I add a person and that person does not have an account yet, I click the little plus sign next to the username field and I'm presented with a New User form.
That is okay.
Now I want to create users in this manner: The username should be in a form of {firstname}.{lastname}[.{serial}] fo that John Smith will have username john.smith and another John Smith would be john.smith.1.
How can I pass the firstname and lastname to the new user form? Also: How to check if there's another user with that username and append the serial number to it?
Thank you
If the first and last names are being entered (but not yet submitted) on the Person form, and you want those values to show up in the new user form view, then you'll have to:
a) use JavaScript to grab the first name and last name when the user hits that add button (the "plus button"), then
b) pass those values into a custom view that dynamically creates the {firstname}.{lastname}.[serial], then
c) assign that value to form.fields['username'].initial
When the user sees the next form, they will have the value you entered pre-populated. This logic should probably go in a custom form method (whichever form manages the username).
This strategy brings up other issues you'll have to address:
1) What if the user changes the First and Last name in the original Person form, before submitting? (#2 below might solve this)
2) Every time the first or last name are changed, you'll have to update the username on the other model
Other things to consider:
You could do this using a custom user model (docs, tutorial), and put those first and last names in the same model, which could eliminate the custom view creation, allow you to create the username dynamically in one page, and make it easier to sync them.