I am designing a car rental program, in which I need to define insurance for all cars. My insurance table contains the ID, the name of the insurance company and the car insurance type. I connected the car insurance table to the LookupEdit control in the car registration form.
In this schedule, the validity of the insurance policy expires, the color of our car line changes, so the insurance policy must be edited. So, when I select a car from the GridControl list, I must display the type of insurance and the name of the insurance company in the LookupEdit control.
I was able to display the insurance type in the LookupEdit control. But the problem is that there are several other companies that are offering the same insurance. Now, I don't know how I can display the type of insurance based on the name of the company I registered in the LookupEdit control so that the user doesn't get into trouble. Thank you for helping me.
Related
I have a problem with Drupal Views.
I have a content type "Company". "Company" has a "City" field (taxonomy term reference) and "Company type" field (A,B,C).
How can I – inside a view – search for City and order by Company Type at the same time?
For example I want to search for Paris. And then I want all Paris Companies sorted initially by Company Type. First A, then B, then C.
How to enable sorting like that?
It depends a little bit on how you display your companies. As table or as list? But generally you simply can add multiple sort criterions.
I am required to extract posted payment journals and I've used LedgerJournalTable. However, I've seen that invoice journal and payment journal are both in that table. Is there any way or is there a unique field that can distinguished if a journal is an invoice or payment?
The field LedgerJournalTable.JournalType backed by the base enum LedgerJournalType (with more than 40 values) can be used to distinguish the journal type.
I have table with Name,Surname, city and Address. (Model, View, Controler- strongly typed)
When I click on some record I want to open another form with
Name,Surname, city and Address and Parent name, but I need
Name,Surname, city and Address to be filled with data from record clicked.
Model is strongly typed.
It's need to be done with two models.
My question is- how to pass data from one model to another (the best way).
I have two content types Institute and Faculties. The title of the Institute content type is Unique Institute Number. This content type also contains Institute Name field. In the Faculty content type I want users to select the Institute Name from a select list. With Node Reference I can show the Title of the Institute Content Type in the select list but Institute Number is not a comprehensible Information list. How can I show the Institute Names in the select list
IIRC, using the titles of the selectable nodes is just the default behavior - you can change this by using a Views module view. On the Node Reference fields configuration form, there should be an 'advanced' section where you can select a view as the source for the select functionality.
I'm using Drupal 6 and Views 2, along with CCK, Panels and Node Relationships. (so far)
I have two basic content types defined:
User Profile (using Content Profile module)
Product
Each of these content types has a node reference to two other content types, Tier and Commission:
User Profile content references "Tier" content
Product content references "Commission Category" content
There may be 5-10 of each of these, and up to 100 of each of users/products.
When a Commission Category is added, dollar values need to be added for each currently existing Tier node.
When a Tier node is added, dollar values for this Tier need to be added to each currently existing Commission Category node.
The desired effect is that users with a "staff" role can administrate both Tiers of users and Categories of Product.
Users will see a value when they view a product that is displayed as a combination of both their Tier and the Commission Category.
For Example:
Category A => Tier 1 ($100), Tier 2 ($200), Tier 3 ($300)
Category B => Tier 1 ($120), Tier 2 ($250), Tier 3 ($300)
Is there a way to do what I'm suggesting? or do I need to try a different approach altogether to achieve the desired effect?
I assume that you also want to be able to later edit those amounts from either the Tier node page or the Commission Category node page.
To make those values easier to manage, you will probably need to create another content type (called Commission for example) which references a Tier and a Commission Category, and holds a dollar value.
What I would do then is to use hook_form_alter() so that in the Tier form, an input field is added for each Commission Category. That way, whenever you add a new Tier (or edit an existing one), you can update all those values at once. Use hook_nodeapi() to insert/update all of the corresponding Commission nodes.
Then you can do the same thing for the Commission Category form, but in the other direction.
If you expect to have a large number of tiers or categories, this may be a heavy operation, but otherwise it should be fine since I'm assuming you wouldn't be changing these values that frequently.