Last active
March 1, 2021 07:11
-
-
Save ranafaraz/5a531b3bfc19f3cc9a57feba7b680ff9 to your computer and use it in GitHub Desktop.
Query to get vehicle record from iDempiere
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT SUM(mp.market_price) FROM adempiere.market_price mp WHERE mp.ad_client_id = 1000000 AND mp.isactive = 'Y' | |
| -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| vt.name AS Vehicle_Type, | |
| m.name AS Manufacturer, | |
| vr.name AS Vehicle_Name, | |
| vr.year AS Reg_Year, | |
| vr.registration_no, | |
| vr.chasis_no, | |
| vr.color, | |
| vr.capacity, | |
| vr.c_bpartner_id AS Allocated_To_Emp, | |
| vr.m_departments_id AS Allocated_To_Depart, | |
| vr.pol_limit, | |
| vr.vehicle_status, | |
| vr.costs AS Purchase_Cost, | |
| (SELECT m.market_price FROM market_price m WHERE m.f_vehicle_id = vr.f_vehicle_id AND m.isactive = 'Y') AS Market_Price | |
| FROM | |
| adempiere.f_vehicle_type vt | |
| INNER JOIN adempiere.f_vehicle_record vr ON (( vr.f_vehicle_type_id = vt.f_vehicle_type_id )) | |
| INNER JOIN adempiere.f_manufacturer m ON (( m.f_manufacturer_id = vr.f_manufacturer_id )) | |
| ORDER BY vt.name, m.name, vr.name ASC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| COUNT(vr.f_vehicle_id) | |
| FROM | |
| adempiere.f_vehicle_record vr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment