[Vtigercrm-developers] Access to product currency in VTiger Web Service

Ola Sikström ola.sikstrom at creativetools.se
Tue Jul 24 07:34:24 PDT 2012


I did notice that, reading about the database models, but I'm using
the web service api, and currency_id doesn't seem to be exposed there.

These are the fields reported for Products by the describe-operation
(sorry for the crappy formatting, will look good in monospace font)

+------------------------------------+------------------+---------------+
| Label                              | Name             | Type          |
+------------------------------------+------------------+---------------+
| Product Name                       | productname      | string        |
| Part Number                        | productcode      | string        |
| Product Active                     | discontinued     | boolean       |
| Manufacturer                       | manufacturer     | picklist      |
| Product Category                   | productcategory  | picklist      |
| Sales Start Date                   | sales_start_date | date          |
| Sales End Date                     | sales_end_date   | date          |
| Support Start Date                 | start_date       | date          |
| Support Expiry Date                | expiry_date      | date          |
| Website                            | website          | url           |
| Vendor Name                        | vendor_id        | reference     |
| Mfr Part No                        | mfr_part_no      | string        |
| Vendor Part No                     | vendor_part_no   | string        |
| Serial No                          | serial_no        | string        |
| Product Sheet                      | productsheet     | string        |
| GL Account                         | glacct           | picklist      |
| Created Time                       | createdtime      | datetime      |
| Modified Time                      | modifiedtime     | datetime      |
| Unit Price                         | unit_price       | currency      |
| Commission Rate                    | commissionrate   | double        |
| Tax Class                          | taxclass         | string        |
| Usage Unit                         | usageunit        | picklist      |
| Qty/Unit                           | qty_per_unit     | double        |
| Qty. in Stock                      | qtyinstock       | double        |
| Reorder Level                      | reorderlevel     | integer       |
| Handler                            | assigned_user_id | owner         |
| Qty. in Demand                     | qtyindemand      | integer       |
| Description                        | description      | text          |
| Product No                         | product_no       | string        |
| Published in webshop               | cf_1130          | boolean       |
| Frakttyp                           | cf_1149          | picklist      |
| Inkopsfrakt exkluderat fran priset | cf_1153          | double        |
| Inkopsfrakt inkluderat i priset    | cf_1154          | double        |
| Minsta inkopsvolym                 | cf_1155          | double        |
| Viktig information                 | cf_1164          | text          |
| VI                                 | cf_1165          | boolean       |
| Last Modified By                   | modifiedby       | reference     |
| productid                          | id               | autogenerated |
+------------------------------------+------------------+---------------+


I noticed that the type for unit_price is reported as currency,
whatever that means.
Using the VTQL-query: "select unit_price from Products" doesn't reveal
any currency information.

unit_price seems to be represented in the original currency entered
for the product, but i have no way of finding out which currency it
is.

/Ola

2012/7/24 Adam Heinz <amh at metricwise.net>
>
> Glancing at my 5.2.1 database, it looks like
> vtiger_products.currency_id is what you want.
>
> On Mon, Jul 23, 2012 at 11:56 AM, Ola Sikström
> <ola.sikstrom at creativetools.se> wrote:
> > Hi,
> >
> > Using the query-command, I can access most relevant details about a product,
> > but i can't figure out how to access the actual currency used by the
> > product. How would I do that?
> >
> > Thanks in advance!
> >
> > --
> > Ola Sikström
> > Creative Tools AB
> >
> > _______________________________________________
> > http://www.vtiger.com/
>
> _______________________________________________
> http://www.vtiger.com/




--
Ola Sikström
Creative Tools AB



More information about the vtigercrm-developers mailing list