'ecmproducts', 'audited' => true, 'comment' => 'EcmProducts', 'duplicate_merge' => true, 'unified_search' => true, 'fields' => array( // add mz 04.12.2023 'attribute' => array( 'name' => 'attribute', 'options' => 'ecmproducts_attribute_dom', 'vname' => 'Cecha', 'len' => 36, 'type' => 'enum' ), 'shape' => array( 'name' => 'shape', 'options' => 'ecmproducts_shape_dom', 'vname' => 'Forma', 'len' => 36, 'type' => 'enum' ), 'ufi' => array( 'name' => 'ufi', 'type' => 'varchar', 'len' => '50', 'vname' => 'UFI' ), 'number' => array( 'name' => 'number', 'type' => 'varchar', 'len' => '50', 'vname' => 'Numer' ), 'url1' => array( 'name' => 'url1', 'type' => 'varchar', 'len' => '1024', 'vname' => 'Zdjęcie wizualizacja' ), 'url2' => array( 'name' => 'url2', 'type' => 'varchar', 'len' => '1024', 'vname' => 'Zdjęcie wizualizacja HiRes' ), 'url3' => array( 'name' => 'url3', 'type' => 'varchar', 'len' => '1024', 'vname' => 'Karta produktu' ), 'url4' => array( 'name' => 'url4', 'type' => 'varchar', 'len' => '1024', 'vname' => 'SDS' ), 'url5' => array( 'name' => 'url5', 'type' => 'varchar', 'len' => '1024', 'vname' => 'Link do strony www Twinpol' ), 'url6' => array( 'name' => 'url6', 'type' => 'varchar', 'len' => '1024', 'vname' => 'Link do katalogu produktu w Google' ), 'url7' => array( 'name' => 'url7', 'type' => 'varchar', 'len' => '1024', 'vname' => 'Link do projektu etykiety' ), 'url8' => array( 'name' => 'url8', 'type' => 'varchar', 'len' => '1024', 'vname' => 'Link do wykrojnika' ), 'url9' => array( 'name' => 'url9', 'type' => 'varchar', 'len' => '1024', 'vname' => 'Link do rodzaju opakowania' ), // end mz // WWW FIELDS 'www_manual_update' => array( 'type' => 'bool', 'name' => 'www_manual_update', 'vname' => 'LBL_WWW_MANUAL_UPDATE', 'default' => '0' ), 'active' => array( 'type' => 'bool', 'name' => 'active', 'vname' => 'Czy aktualny?', 'default' => '1' ), 'group_name' => array( 'name' => 'group_name', 'id_name' => 'group_id', 'vname' => 'Grupa produktowa', 'type' => 'relate', 'group' => 'group_name', 'dbtype' => 'varchar', 'len' => '255', 'module' => 'EcmProductGroups', 'massupdate' => false, 'required' => false ), 'group_id' => array( 'name' => 'group_id', 'type' => 'id', 'module' => 'Accounts', 'vname' => 'EcmProductGroups', 'group' => 'group_name', 'massupdate' => false, 'reportable' => false, 'required' => false ), 'www_available' => array( 'type' => 'bool', 'name' => 'www_available', 'vname' => 'LBL_WWW_AVAILABLE', 'default' => '0' ), 'www_popular' => array( 'type' => 'bool', 'name' => 'www_popular', 'vname' => 'LBL_WWW_POPULAR', 'default' => '0' ), 'www_price_pln' => array( 'type' => 'currency', 'name' => 'www_price_pln', 'vname' => 'LBL_WWW_PRICE_PLN', 'max_size' => '7', 'precision' => '2', 'dbType' => 'double', 'len' => '7,2' ), 'www_price_eur' => array( 'type' => 'currency', 'name' => 'www_price_eur', 'vname' => 'LBL_WWW_PRICE_EUR', 'max_size' => '7', 'precision' => '2', 'dbType' => 'double', 'len' => '7,2' ), 'www_state' => array( 'name' => 'www_state', 'options' => 'ecmproducts_www_state_dom', 'vname' => 'LBL_WWW_STATE', 'type' => 'enum' ), 'www_state_desc_pl' => array( 'name' => 'www_state_desc_pl', 'vname' => 'LBL_WWW_STATE_DESC_PL', 'type' => 'varchar', 'len' => 255 ), 'www_state_desc_en' => array( 'name' => 'www_state_desc_en', 'vname' => 'LBL_WWW_STATE_DESC_EN', 'type' => 'varchar', 'len' => 255 ), // STANDARD FIELDS SECTION 'id' => array( 'name' => 'id', 'vname' => 'LBL_ID', 'type' => 'id', 'required' => true, 'reportable' => false, 'comment' => 'Unique identifier' ), 'name' => array( 'name' => 'name', 'vname' => 'LBL_NAME', 'type' => 'name', 'required' => true, 'dbType' => 'varchar', 'len' => 255, 'audited' => true, 'unified_search' => true, 'comment' => 'The short description of the record contents', 'massupdate' => true, 'merge_filter' => 'selected' ), 'date_entered' => array( 'name' => 'date_entered', 'vname' => 'LBL_DATE_ENTERED', 'type' => 'datetime', 'required' => true, 'comment' => 'Date record created' ), 'date_modified' => array( 'name' => 'date_modified', 'vname' => 'LBL_DATE_MODIFIED', 'type' => 'datetime', 'required' => true, 'comment' => 'Date record last modified' ), 'modified_user_id' => array( 'name' => 'modified_user_id', 'rname' => 'user_name', 'id_name' => 'modified_user_id', 'vname' => 'LBL_MODIFIED', 'type' => 'assigned_user_name', 'table' => 'modified_user_id_users', 'isnull' => 'false', 'dbType' => 'varchar', 'len' => 36, 'required' => true, 'reportable' => true, 'comment' => 'User who last modified record' ), 'assigned_user_id' => array( 'name' => 'assigned_user_id', 'rname' => 'user_name', 'id_name' => 'assigned_user_id', 'vname' => 'LBL_ASSIGNED_TO_ID', 'group' => 'assigned_user_name', 'type' => 'relate', 'table' => 'users', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'comment' => 'User ID assigned to record', 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'assigned_user_name' => array( 'name' => 'assigned_user_name', 'vname' => 'LBL_ASSIGNED_TO', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'users', 'id_name' => 'assigned_user_id', 'module' => 'Users', 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'created_by' => array( 'name' => 'created_by', 'rname' => 'user_name', 'id_name' => 'created_by', 'vname' => 'LBL_CREATED', 'type' => 'assigned_user_name', 'table' => 'created_by_users', 'isnull' => 'false', 'dbType' => 'varchar', 'len' => 36, 'comment' => 'User that created the record' ), 'created_by_link' => array( 'name' => 'created_by_link', 'type' => 'link', 'relationship' => 'ecmproducts_created_by', 'vname' => 'LBL_CREATED_BY_USER', 'link_type' => 'one', 'module' => 'Users', 'bean_name' => 'User', 'source' => 'non-db' ), 'modified_user_link' => array( 'name' => 'modified_user_link', 'type' => 'link', 'relationship' => 'ecmproducts_modified_user', 'vname' => 'LBL_MODIFIED_BY_USER', 'link_type' => 'one', 'module' => 'Users', 'bean_name' => 'User', 'source' => 'non-db' ), 'assigned_user_link' => array( 'name' => 'assigned_user_link', 'type' => 'link', 'relationship' => 'ecmproducts_assigned_user', 'vname' => 'LBL_ASSIGNED_TO_USER', 'link_type' => 'one', 'module' => 'Users', 'bean_name' => 'User', 'source' => 'non-db', 'duplicate_merge' => 'enabled', 'rname' => 'user_name', 'id_name' => 'assigned_user_id', 'table' => 'users' ), 'deleted' => array( 'name' => 'deleted', 'vname' => 'LBL_CREATED_BY', 'type' => 'bool', 'required' => true, 'reportable' => false, 'comment' => 'Record deletion indicator' ), 'is_mainproduct' => array( 'type' => 'bool', 'name' => 'is_mainproduct', 'vname' => 'LBL_IS_MAINPRODUCT', 'default' => '0' ), 'mainproduct' => array( 'name' => 'mainproduct', 'type' => 'link', 'relationship' => 'mainproduct_ecmproducts', 'module' => 'EcmProducts', 'bean_name' => 'EcmProducts', 'source' => 'non-db', 'vname' => 'LBL_MAINPRODUCT' ), 'mainproduct_id' => array( 'name' => 'mainproduct_id', 'type' => 'varchar', 'len' => '36', 'vname' => 'LBL_MAINPRODUCT' ), 'mainproduct_name' => array( 'name' => 'mainproduct_name', 'type' => 'relate', 'id_name' => 'mainproduct_id', 'module' => 'EcmProducts', 'len' => '30', 'vname' => 'LBL_MAINPRODUCT', 'source' => 'non-db', 'rname' => 'name' ), // add mz 09-11-2011 'to_order' => array( 'name' => 'to_order', 'vname' => 'To order', 'type' => 'bool' ), // NEW FIELDS SECTION 'stock_addresses' => array( 'name' => 'stock_addresses', 'vname' => 'Adresy magazynowe', 'type' => 'varchar', 'len' => 50, 'source' => 'non-db' ), 'code' => array( 'type' => 'varchar', 'name' => 'code', 'vname' => 'LBL_PRODUCT_INDEX', 'comment' => 'Product index', 'required' => true, 'max_size' => '40', 'len' => '40' ), 'product_category_id' => array( 'name' => 'product_category_id', 'rname' => 'name', 'id_name' => 'product_category_id', 'vname' => 'LBL_PRODUCT_CATEGORY_ID', 'group' => 'product_category_name', 'type' => 'relate', 'table' => 'ecmproductcategories', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'product_category_name' => array( 'name' => 'product_category_name', 'vname' => 'LBL_PRODUCT_CATEGORY', 'type' => 'relate', 'reportable' => false, // 'source' => 'non-db', 'table' => 'ecmproductcategories', 'id_name' => 'product_category_id', 'module' => 'EcmProductCategories', 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'product_subcategory_id' => array( 'name' => 'product_subcategory_id', 'rname' => 'name', 'id_name' => 'product_subcategory_id', 'vname' => 'LBL_PRODUCT_SUBCATEGORY_ID', 'group' => 'product_subcategory_name', 'type' => 'relate', 'table' => 'ecmproductsubcategories', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'product_subcategory_name' => array( 'name' => 'product_subcategory_name', 'vname' => 'LBL_PRODUCT_SUBCATEGORY', 'type' => 'relate', 'reportable' => false, // 'source' => 'non-db', 'table' => 'ecmproductsubcategories', 'id_name' => 'product_subcategory_id', 'module' => 'EcmProductSubCategories', 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'stock_id' => array( 'name' => 'stock_id', 'rname' => 'name', 'id_name' => 'stock_id', 'vname' => 'LBL_STOCK_ID', 'group' => 'stock_name', 'type' => 'relate', 'table' => 'ecmstocks', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false, 'source' => 'non-db' ), 'stock_name' => array( 'name' => 'stock_name', 'vname' => 'LBL_STOCK_NAME', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'ecmstocks', 'id_name' => 'stock_id', 'module' => 'EcmStocks', 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'product_line_id' => array( 'name' => 'product_line_id', 'rname' => 'name', 'id_name' => 'product_line_id', 'vname' => 'LBL_PRODUCT_LINE_ID', 'group' => 'product_line_name', 'type' => 'relate', 'table' => 'ecmproductlines', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'product_line_name' => array( 'name' => 'product_line_name', 'vname' => 'LBL_PRODUCT_LINE', 'type' => 'relate', 'reportable' => false, // 'source' => 'non-db', 'table' => 'ecmproductlines', 'id_name' => 'product_line_id', 'module' => 'EcmProductLines', 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'manufacturer_id' => array( 'name' => 'manufacturer_id', 'rname' => 'name', 'id_name' => 'manufacturer_id', 'vname' => 'LBL_MANUFACTURER_ID', 'group' => 'manufacturer_name', 'type' => 'relate', 'table' => 'ecmproductmanufacturers', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'manufacturer_name' => array( 'name' => 'manufacturer_name', 'vname' => 'LBL_MANUFACTURER', 'type' => 'relate', 'reportable' => false, // 'source' => 'non-db', 'table' => 'ecmproductmanufacturers', 'id_name' => 'manufacturer_id', 'module' => 'EcmProductManufacturers', 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'contact_id' => array( 'name' => 'contact_id', 'rname' => 'name', 'id_name' => 'contact_id', 'vname' => 'LBL_CONTACT_ID', 'group' => 'contact_name', 'type' => 'relate', 'table' => 'contacts', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'contact_name' => array( 'name' => 'contact_name', 'vname' => 'LBL_CONTACT_NAME', 'type' => 'relate', 'reportable' => false, // 'source' => 'non-db', 'table' => 'contacts', 'id_name' => 'contact_id', 'module' => 'Contacts', 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'vendor_id' => array( 'name' => 'vendor_id', 'rname' => 'name', 'id_name' => 'vendor_id', 'vname' => 'LBL_VENDOR_ID', 'group' => 'vendor_name', 'type' => 'relate', 'table' => 'accounts', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'vendor_name' => array( 'name' => 'vendor_name', 'vname' => 'LBL_VENDOR_NAME', 'type' => 'relate', 'reportable' => false, // 'source' => 'non-db', 'table' => 'accounts', 'id_name' => 'vendor_id', 'module' => 'Accounts', 'duplicate_merge' => 'disabled', 'massupdate' => false ), 'vendor_part_no' => array( 'type' => 'varchar', 'name' => 'vendor_part_no', 'vname' => 'LBL_VENDOR_PART_NO', 'comment' => 'Vendor part no', 'max_size' => '200', 'len' => '200' ), 'product_active' => array( 'type' => 'bool', 'name' => 'product_active', 'vname' => 'LBL_PRODUCT_ACTIVE', 'comment' => 'Product active', 'default' => '1' ), 'flag' => array( 'type' => 'bool', 'name' => 'flag', 'vname' => 'LBL_FLAG', 'comment' => 'Flag', 'default' => '1', 'massupdate' => false ), 'production' => array( 'type' => 'bool', 'name' => 'production', 'vname' => 'LBL_PRODUCTION', 'comment' => 'Production', 'default' => '1' ), 'th' => array( 'type' => 'bool', 'name' => 'th', 'vname' => 'LBL_TH', 'comment' => 'TH', 'default' => '1' ), 'end_of_line' => array( 'type' => 'bool', 'name' => 'end_of_line', 'vname' => 'LBL_END_OF_LINE', 'comment' => 'End of line', 'default' => '1' ), 'sales_start_date' => array( 'type' => 'date', 'name' => 'sales_start_date', 'vname' => 'LBL_SALES_START_DATE', 'comment' => 'Sales start date', 'massupdate' => true ), 'sales_end_date' => array( 'type' => 'date', 'name' => 'sales_end_date', 'vname' => 'LBL_SALES_END_DATE', 'comment' => 'Sales end date', 'massupdate' => true ), 'parent_type' => array( 'name' => 'parent_type', 'vname' => 'LBL_PARENT', 'type' => 'varchar', 'group' => 'parent_name', 'reportable' => false, 'len' => '25', 'comment' => 'The Sugar object to which the call is related', 'massupdate' => false ), 'unit_id' => array( 'name' => 'unit_id', 'options' => 'ecmproducts_unit_dom', 'vname' => 'LBL_UNIT_NAME', 'type' => 'enum', 'len' => '10', 'massupdate' => false ), 'parent_name' => array( 'name' => 'parent_name', 'parent_type' => 'ecmproducts_parent_dom', 'type_name' => 'parent_type', 'id_name' => 'parent_id', 'vname' => 'LBL_PARENT_NAME', 'type' => 'parent', 'group' => 'parent_name', 'dbtype' => 'varchar', 'len' => '255', // 'source'=>'non-db', 'massupdate' => false, 'options' => 'ecmquotes_parent_dom' ), 'parent_id' => array( 'name' => 'parent_id', 'type' => 'id', 'vname' => 'LBL_PARENT_ID', 'group' => 'parent_name', 'massupdate' => false, 'reportable' => false ), 'website' => array( 'type' => 'varchar', 'name' => 'website', 'vname' => 'LBL_WEBSITE', 'comment' => 'Website', 'max_size' => '255', 'len' => '255' ), 'website_update' => array( 'type' => 'bool', 'name' => 'website_update', 'vname' => 'LBL_WEBSITE', 'comment' => 'Website', 'len' => '1', 'default' => '1' ), 'part_no' => array( 'type' => 'varchar', 'name' => 'part_no', 'vname' => 'LBL_PART_NO', 'comment' => 'Part no', 'max_size' => '200', 'len' => '200' ), 'serial_no' => array( 'type' => 'varchar', 'name' => 'serial_no', 'vname' => 'LBL_SERIAL_NO', 'comment' => 'Serial no', 'max_size' => '200', 'len' => '200' ), 'exchange_rate_id' => array( 'type' => 'varchar', 'name' => 'exchange_rate_id', 'vname' => 'LBL_EXCHANGE_RATE_ID', 'comment' => 'Exchange rate id', 'max_size' => '36', 'len' => '36' ), 'exchange_rate_name' => array( 'type' => 'varchar', 'name' => 'exchange_rate_name', 'vname' => 'LBL_EXCHANGE_RATE_NAME', 'comment' => 'Exchange rate name', 'max_size' => '40', 'len' => '40' ), 'fob_price' => array( 'type' => 'currency', 'name' => 'fob_price', 'vname' => 'LBL_FOB_PRICE', 'comment' => 'FOB price', 'max_size' => '7', 'precision' => '2', 'dbType' => 'double', 'len' => '7,2' ), 'purchase_price' => array( 'type' => 'currency', 'name' => 'purchase_price', 'vname' => 'LBL_UNIT_PRICE', 'comment' => 'Unit price', 'max_size' => '11', 'precision' => '2', 'dbType' => 'double', 'len' => '11,2' ), 'ems_price' => array( 'type' => 'currency', 'name' => 'ems_price', 'vname' => 'LBL_EMS_PRICE', 'comment' => 'EMS price', 'max_size' => '7', 'precision' => '2', 'dbType' => 'double', 'len' => '7,2' ), 'commission_rate' => array( 'type' => 'currency', 'name' => 'commission_rate', 'vname' => 'LBL_COMMISSION_RATE', 'comment' => 'Commission rate', 'max_size' => '4', 'precision' => '2', 'dbType' => 'double', 'len' => '9,2' ), 'custom_duty_rate' => array( 'type' => 'currency', 'name' => 'custom_duty_rate', 'vname' => 'LBL_CUSTOM_DUTY_RATE', 'comment' => 'Custom duty rate', 'max_size' => '5', 'precision' => '2', 'dbType' => 'double', 'len' => '5,2' ), 'srp_price' => array( 'type' => 'currency', 'name' => 'srp_price', 'vname' => 'LBL_SRP_PRICE', 'comment' => 'SRP price', 'max_size' => '7', 'precision' => '2', 'dbType' => 'double', 'len' => '7,2' ), 'srp_price_eur' => array( 'type' => 'currency', 'name' => 'srp_price_eur', 'vname' => 'LBL_SRP_PRICE_EUR', 'comment' => 'SRP price eur', 'max_size' => '7', 'precision' => '2', 'dbType' => 'double', 'len' => '7,2' ), 'srp_promo_price' => array( 'type' => 'currency', 'name' => 'srp_promo_price', 'vname' => 'LBL_SRP_PROMO_PRICE', 'comment' => 'SRP promo price', 'max_size' => '7', 'precision' => '2', 'dbType' => 'double', 'len' => '7,2' ), 'tax_class_id' => array( 'type' => 'varchar', 'name' => 'tax_class_id', 'vname' => 'LBL_TAX_CLASS_ID', 'comment' => 'Tax class id', 'max_size' => '36', 'len' => '36' ), 'tax_class_name' => array( 'type' => 'varchar', 'name' => 'tax_class_name', 'vname' => 'LBL_TAX_CLASS_NAME', 'comment' => 'Tax class name', 'max_size' => '40', 'len' => '40' ), 'usage_unit_id' => array( 'type' => 'varchar', 'name' => 'usage_unit_id', 'vname' => 'LBL_USAGE_UNIT_ID', 'comment' => 'Usage unit id', 'max_size' => '36', 'len' => '36' ), 'usage_unit_name' => array( 'type' => 'varchar', 'name' => 'usage_unit_name', 'vname' => 'LBL_USAGE_UNIT_NAME', 'comment' => 'Usage unit name', 'max_size' => '40', 'len' => '40' ), 'qty_in_stock' => array( 'type' => 'varchar', 'name' => 'qty_in_stock', 'vname' => 'LBL_QTY_IN_STOCK', 'comment' => 'Qty in stock', 'max_size' => '40', 'len' => '40' ), 'qty_in_demand' => array( 'type' => 'varchar', 'name' => 'qty_in_demand', 'vname' => 'LBL_QTY_IN_DEMAND', 'comment' => 'Qty in demand', 'max_size' => '40', 'len' => '40' ), 'ems_qty_in_stock' => array( 'type' => 'varchar', 'name' => 'ems_qty_in_stock', 'vname' => 'LBL_EMS_QTY_IN_STOCK', 'comment' => 'EMS qty in stock', 'max_size' => '40', 'len' => '40' ), 'reorder_level' => array( 'type' => 'int', 'name' => 'reorder_level', 'vname' => 'LBL_REORDER_LEVEL', 'comment' => 'Reorder level', 'len' => '11' ), 'sales_last_month_1' => array( 'type' => 'currency', 'name' => 'sales_last_month_1', 'vname' => 'LBL_SALES_LAST_MONTH_1', 'comment' => 'Sales last month -1', 'max_size' => '8', 'precision' => '2', 'dbType' => 'double', 'len' => '8,2' ), 'sales_last_month' => array( 'type' => 'currency', 'name' => 'sales_last_month', 'vname' => 'LBL_SALES_LAST_MONTH', 'comment' => 'Sales last month', 'max_size' => '8', 'precision' => '2', 'dbType' => 'double', 'len' => '8,2' ), 'sales_this_month' => array( 'type' => 'currency', 'name' => 'sales_this_month', 'vname' => 'LBL_SALES_THIS_MONTH', 'comment' => 'Sales this month', 'max_size' => '8', 'precision' => '2', 'dbType' => 'double', 'len' => '8,2' ), 'qty_per_unit' => array( 'type' => 'currency', 'name' => 'qty_per_unit', 'vname' => 'LBL_QTY_PER_UNIT', 'comment' => 'Qty per unit', 'max_size' => '11', 'precision' => '2', 'dbType' => 'double', 'len' => '11,2' ), 'average_sale_3_months' => array( 'type' => 'currency', 'name' => 'average_sale_3_months', 'vname' => 'LBL_AVERAGE_SALE_3_MONTHS', 'comment' => 'Average sale 3 months', 'max_size' => '8', 'precision' => '2', 'dbType' => 'double', 'len' => '8,2' ), 'sales_plus_1' => array( 'type' => 'currency', 'name' => 'sales_plus_1', 'vname' => 'LBL_SALES_PLUS_1', 'comment' => 'Sales plus 1', 'max_size' => '6', 'precision' => '0', 'dbType' => 'double', 'len' => '6,0' ), 'sales_plus_2' => array( 'type' => 'currency', 'name' => 'sales_plus_2', 'vname' => 'LBL_SALES_PLUS_2', 'comment' => 'Sales plus 2', 'max_size' => '6', 'precision' => '0', 'dbType' => 'double', 'len' => '6,0' ), 'sales_plus_3' => array( 'type' => 'currency', 'name' => 'sales_plus_3', 'vname' => 'LBL_SALES_PLUS_3', 'comment' => 'Sales plus 3', 'max_size' => '6', 'precision' => '0', 'dbType' => 'double', 'len' => '6,0' ), 'product_picture' => array( 'type' => 'varchar', 'name' => 'product_picture', 'vname' => 'LBL_PRODUCT_PICTURE', 'comment' => 'Product picture', 'max_size' => '255', 'len' => '255' ), 'packing_front_picture' => array( 'type' => 'varchar', 'name' => 'packing_front_picture', 'vname' => 'LBL_PACKING_FRONT_PICTURE', 'comment' => 'Packing front picture', 'max_size' => '255', 'len' => '255' ), 'driver_1' => array( 'type' => 'varchar', 'name' => 'driver_1', 'vname' => 'LBL_DRIVER_1', 'comment' => 'Driver 1', 'max_size' => '255', 'len' => '255' ), 'driver_2' => array( 'type' => 'varchar', 'name' => 'driver_2', 'vname' => 'LBL_DRIVER_2', 'comment' => 'Driver 2', 'max_size' => '255', 'len' => '255' ), 'moq' => array( 'type' => 'currency', 'name' => 'moq', 'vname' => 'LBL_MOQ', 'comment' => 'MOQ', 'max_size' => '6', 'precision' => '0', 'dbType' => 'double', 'len' => '6,0' ), 'fob_basis_id' => array( 'type' => 'varchar', 'name' => 'fob_basis_id', 'vname' => 'LBL_FOB_BASIS_ID', 'comment' => 'FOB basis id', 'max_size' => '36', 'len' => '36' ), 'fob_basis_name' => array( 'type' => 'varchar', 'name' => 'fob_basis_name', 'vname' => 'LBL_FOB_BASIS_NAME', 'comment' => 'FOB basis name', 'max_size' => '40', 'len' => '40' ), 'delivery_time_fob' => array( 'type' => 'currency', 'name' => 'delivery_time_fob', 'vname' => 'LBL_DELIVERY_TIME_FOB', 'comment' => 'Delivery time FOB', 'max_size' => '4', 'precision' => '0', 'dbType' => 'double', 'len' => '4,0' ), 'pieces_per_carton' => array( 'type' => 'float', 'name' => 'pieces_per_carton', 'vname' => 'LBL_PIECES_PER_CARTON', 'comment' => 'Pieces per carton', 'max_size' => '7', 'precision' => '0', 'dbType' => 'double', 'len' => '7,0' ), 'product_netto_weight' => array( 'type' => 'float', 'name' => 'product_netto_weight', 'vname' => 'LBL_PRODUCT_NETTO_WEIGHT', 'comment' => 'Product netto weight (kg)', 'max_size' => '9', 'precision' => '6', 'dbType' => 'double', 'len' => '9,6' ), 'product_brutto_weight' => array( 'type' => 'float', 'name' => 'product_brutto_weight', 'vname' => 'LBL_PRODUCT_BRUTTO_WEIGHT', 'comment' => 'Product brutto weight (kg)', 'max_size' => '9', 'precision' => '6', 'dbType' => 'double', 'len' => '9,6' ), 'packing_type_id' => array( 'type' => 'varchar', 'name' => 'packing_type_id', 'vname' => 'LBL_PACKING_TYPE_ID', 'comment' => 'Packing type id', 'max_size' => '36', 'len' => '36' ), 'packing_type_name' => array( 'type' => 'varchar', 'name' => 'packing_type_name', 'vname' => 'LBL_PACKING_TYPE_NAME', 'comment' => 'Packing type', 'max_size' => '40', 'len' => '40' ), 'packing_dimensions_1' => array( 'type' => 'float', 'name' => 'packing_dimensions_1', 'vname' => 'LBL_PACKING_DIMENSIONS_1', 'comment' => 'Packing dimensions (cm)', 'max_size' => '5', 'precision' => '2', 'dbType' => 'double', 'len' => '5,2' ), 'packing_dimensions_2' => array( 'type' => 'float', 'name' => 'packing_dimensions_2', 'vname' => 'LBL_PACKING_DIMENSIONS_2', 'comment' => 'Packing dimensions (cm)', 'max_size' => '5', 'precision' => '2', 'dbType' => 'double', 'len' => '5,2' ), 'packing_dimensions_3' => array( 'type' => 'float', 'name' => 'packing_dimensions_3', 'vname' => 'LBL_PACKING_DIMENSIONS_3', 'comment' => 'Packing dimensions (cm)', 'max_size' => '5', 'precision' => '2', 'dbType' => 'double', 'len' => '5,2' ), 'rma' => array( 'type' => 'float', 'name' => 'rma', 'vname' => 'LBL_RMA', 'comment' => 'RMA (%)', 'max_size' => '6', 'precision' => '3', 'dbType' => 'double', 'len' => '6,3' ), 'carton_dimensions_1' => array( 'type' => 'decimal', 'name' => 'carton_dimensions_1', 'vname' => 'LBL_CARTON_DIMENSIONS_1', 'comment' => 'Carton dimensions (m)', 'len' => '5,2' ), 'carton_dimensions_2' => array( 'type' => 'decimal', 'name' => 'carton_dimensions_2', 'vname' => 'LBL_CARTON_DIMENSIONS_2', 'comment' => 'Carton dimensions (m)', 'len' => '5,2' ), 'carton_dimensions_3' => array( 'type' => 'decimal', 'name' => 'carton_dimensions_3', 'vname' => 'LBL_CARTON_DIMENSIONS_3', 'comment' => 'Carton dimensions (m)', 'len' => '5,2' ), 'carton_netto_weight' => array( 'type' => 'float', 'name' => 'carton_netto_weight', 'vname' => 'LBL_CARTON_NETTO_WEIGHT', 'comment' => 'Carton netto weight', 'max_size' => '9', 'precision' => '3', 'dbType' => 'double', 'len' => '9,3' ), 'carton_brutto_weight' => array( 'type' => 'float', 'name' => 'carton_brutto_weight', 'vname' => 'LBL_CARTON_BRUTTO_WEIGHT', 'comment' => 'Carton brutto weight', 'max_size' => '9', 'precision' => '3', 'dbType' => 'double', 'len' => '9,3' ), 'carton_volume_meter' => array( 'type' => 'float', 'name' => 'carton_volume_meter', 'vname' => 'LBL_CARTON_VOLUME_METER', 'comment' => 'Carton volume (cubic meter)', 'max_size' => '5', 'precision' => '2', 'dbType' => 'double', 'len' => '5,2' ), 'documents' => array( 'name' => 'documents', 'type' => 'link', 'relationship' => 'ecmproduct_documents', 'source' => 'non-db', 'vname' => 'LBL_NOTES' ), 'carton_volume_feet' => array( 'type' => 'float', 'name' => 'carton_volume_feet', 'vname' => 'LBL_CARTON_VOLUME_FEET', 'comment' => 'Carton volume (cubic feet)', 'max_size' => '5', 'precision' => '2', 'dbType' => 'double', 'len' => '5,2' ), 'country_of_origin' => array( 'type' => 'varchar', 'name' => 'country_of_origin', 'vname' => 'LBL_COUNTRY_OF_ORIGIN', 'comment' => 'Country of origin', 'max_size' => '255', 'len' => '255' ), 'certificate_of_origin' => array( 'type' => 'bool', 'name' => 'certificate_of_origin', 'vname' => 'LBL_CERTIFICATE_OF_ORIGIN', 'comment' => 'Certificate of origin', 'default' => '1', 'massupdate' => false ), 'form_a' => array( 'type' => 'bool', 'name' => 'form_a', 'vname' => 'LBL_FORM_A', 'comment' => 'Form A', 'default' => '1', 'massupdate' => false ), 'vat_value' => array( 'type' => 'decimal', 'name' => 'vat_value', 'vname' => 'LBL_VAT_VALUE', 'len' => '5,3' ), 'vat_name' => array( 'type' => 'varchar', 'name' => 'vat_name', 'vname' => 'LBL_VAT_NAME', 'len' => '50' ), 'vat_id' => array( 'type' => 'varchar', 'name' => 'vat_id', 'vname' => 'LBL_VAT_ID', 'len' => '36' ), 'selling_price' => array( 'type' => 'decimal', 'name' => 'selling_price', 'vname' => 'LBL_SELLING_PRICE', 'len' => '11,2' ), 'ems_ordered' => array( 'type' => 'int', 'name' => 'ems_ordered', 'vname' => 'LBL_EMS_ORDERED', 'len' => '11' ), 'ordered' => array( 'type' => 'int', 'name' => 'ordered', 'vname' => 'LBL_EMS_ORDERED', 'len' => '11' ), 'stock_month' => array( 'type' => 'decimal', 'name' => 'stock_month', 'vname' => 'LBL_STOCK_MONTH', 'len' => '11,2' ), 'description_card' => array( 'type' => 'bool', 'name' => 'description_card', 'vname' => 'LBL_DESCRIPTION_CARD', 'massupdate' => false ), 'characteristic_card' => array( 'type' => 'bool', 'name' => 'characteristic_card', 'vname' => 'LBL_CHARACTERISTIC_CARD', 'massupdate' => false ), 'specification_card' => array( 'type' => 'bool', 'name' => 'specification_card', 'vname' => 'LBL_SPECIFICATION_CARD', 'massupdate' => false ), 'used_to_card' => array( 'type' => 'bool', 'name' => 'used_to_card', 'vname' => 'LBL_USED_TO_CARD', 'massupdate' => false ), 'image_card' => array( 'name' => 'image_card', 'options' => 'ecmproducts_image_dom', 'vname' => 'LBL_IMAGE_CARD', 'type' => 'enum', 'len' => '10', 'massupdate' => false ), 'status' => array( 'name' => 'status', 'options' => 'ecmproducts_status_dom', 'vname' => 'LBL_STATUS', 'type' => 'enum', 'default' => 'active', 'len' => '36', 'massupdate' => false ), 'category' => array( 'name' => 'category', 'options' => 'ecmproducts_category_dom', 'vname' => 'Kategoria', 'type' => 'enum', 'default' => 'active', 'len' => '36', 'massupdate' => false ), 'product_group' => array( 'name' => 'product_group', 'options' => 'ecmproducts_group_dom', 'vname' => 'Grupa produktowa', 'type' => 'enum', 'default' => 'active', 'len' => '36', 'massupdate' => false ), 'group_ks' => array( 'name' => 'group_ks', 'options' => 'ecmproducts_group_ks_dom', 'vname' => 'LBL_GROUP_KS', 'type' => 'enum', 'len' => '3', 'required' => true ), 'add_status' => array( 'name' => 'add_status', 'options' => 'ecmproducts_add_status_dom', 'vname' => 'LBL_ADD_STATUS', 'type' => 'enum', 'len' => '10', 'massupdate' => false ), 'description' => array( 'name' => 'description', 'vname' => 'LBL_DESCRIPTION', 'type' => 'text' ), 'production_description' => array( 'name' => 'description', 'vname' => 'LBL_DESCRIPTION', 'type' => 'text' ), 'models' => array( 'name' => 'models', 'vname' => 'LBL_MODELS', 'type' => 'text' ), 'ean' => array( 'name' => 'ean', 'vname' => 'LBL_EAN', 'type' => 'varchar', 'len' => '50' ), 'ean2' => array( 'name' => 'ean2', 'vname' => 'LBL_EAN2', 'type' => 'varchar', 'len' => '50' ), //add mz@bim-it.pl 29.04.2021 'brand' => array( 'name' => 'brand', 'options' => 'ecmproducts_brand_dom', 'vname' => 'LBL_BRAND', 'type' => 'enum', 'default' => 'active', 'len' => '36', 'massupdate' => false ), 'brand_label' => array( 'name' => 'brand_label', 'vname' => 'LBL_BRAND_LABEL', 'type' => 'varchar', 'len' => '100' ), //end mz@bim-it.pl 'boxes_per_layer' => array( 'name' => 'boxes_per_layer', 'vname' => 'LBL_BOXES_PER_LAYER', 'type' => 'int' ), 'number_of_layers' => array( 'name' => 'number_of_layers', 'vname' => 'LBL_NUMBER_OF_LAYERS', 'type' => 'int' ), 'boxes_per_palette' => array( 'name' => 'boxes_per_palette', 'vname' => 'LBL_BOXES_PER_PALETTE', 'type' => 'int' ), 'pieces_per_palette' => array( 'name' => 'pieces_per_palette', 'vname' => 'LBL_PIECES_PER_PALETTE', 'type' => 'int' ), 'palette_weight_brutto' => array( 'name' => 'palette_weight_brutto', 'vname' => 'LBL_PALETTE_WEIGHT_BRUTTO', 'type' => 'float', 'dbType' => 'double' ), 'items_list_panel' => array( 'name' => 'items_list_panel', 'vname' => 'LBL_ITEMS', 'type' => 'text', 'source' => 'non-db' ), 'graduated_prices' => array( 'name' => 'graduated_prices', 'vname' => 'LBL_GRADUATED_PRICES', 'type' => 'text' ), 'lead_time' => array( 'name' => 'lead_time', 'vname' => 'LBL_LEAD_TIME', 'type' => 'int' ), 'ecmstockins' => array( 'name' => 'ecmstockins', 'type' => 'link', 'relationship' => 'ecmproducts_ecmstockins', 'source' => 'non-db', 'vname' => 'LBL_STOCKIN' ), 'ecmstockouts' => array( 'name' => 'ecmstockouts', 'type' => 'link', 'relationship' => 'ecmproducts_ecmstockouts', 'source' => 'non-db', 'vname' => 'LBL_STOCKOUT' ), 'ecmpurchaseorders' => array( 'name' => 'ecmpurchaseorders', 'type' => 'link', 'relationship' => 'ecmproducts_ecmpurchaseorders', 'source' => 'non-db', 'vname' => 'LBL_ECMPURCHASEORDERS' ), 'ecmsales' => array( 'name' => 'ecmsales', 'type' => 'link', 'relationship' => 'ecmproducts_ecmsales', 'source' => 'non-db', 'vname' => 'LBL_ECMSALES' ), 'ecmstockdocins' => array( 'name' => 'ecmstockdocins', 'type' => 'link', 'relationship' => 'ecmproducts_ecmstockdocins', 'source' => 'non-db', 'vname' => 'LBL_ECMSTOCKDOCINS' ), 'ecmstockdocouts' => array( 'name' => 'ecmstockdocouts', 'type' => 'link', 'relationship' => 'ecmproducts_ecmstockdocouts', 'source' => 'non-db', 'vname' => 'LBL_ECMSTOCKDOCOUTS' ), 'ecmstockdocinsideins' => array( 'name' => 'ecmstockdocinsideins', 'type' => 'link', 'relationship' => 'ecmproducts_ecmstockdocinsideins', 'source' => 'non-db', 'vname' => 'LBL_ECMSTOCKDOCINSIDEINS' ), 'ecmstockdoccorrects' => array( 'name' => 'ecmstockdoccorrects', 'type' => 'link', 'relationship' => 'ecmproducts_ecmstockdoccorrects', 'source' => 'non-db', 'vname' => 'LBL_ECMSTOCKDOCINSIDEINS' ), 'ecmstockdocinsideouts' => array( 'name' => 'ecmstockdocinsideouts', 'type' => 'link', 'relationship' => 'ecmproducts_ecmstockdocinsideouts', 'source' => 'non-db', 'vname' => 'LBL_ECMSTOCKDOCINSIDEOUTS' ), 'ecmstockdocmoves' => array( 'name' => 'ecmstockdocmoves', 'type' => 'link', 'relationship' => 'ecmproducts_ecmstockdocmoves', 'source' => 'non-db', 'vname' => 'LBL_ECMSTOCKDOCMOVES' ), 'ecmdeliverynotes' => array( 'name' => 'ecmdeliverynotes', 'type' => 'link', 'relationship' => 'ecmproducts_ecmdeliverynotes', 'source' => 'non-db', 'vname' => 'LBL_ECMDELIVERYNOTES' ), 'ecminvoiceouts' => array( 'name' => 'ecminvoiceouts', 'type' => 'link', 'relationship' => 'ecmproducts_ecminvoiceouts', 'source' => 'non-db', 'vname' => 'LBL_ECMINVOICEOUTS' ), 'ecminsideorders' => array( 'name' => 'ecminsideorders', 'type' => 'link', 'relationship' => 'ecmproducts_ecminsideorders', 'source' => 'non-db', 'vname' => 'LBL_ECMINVOICEOUTS' ), 'ecmquotes' => array( 'name' => 'ecmquotes', 'type' => 'link', 'relationship' => 'ecmproducts_ecmquotes', 'source' => 'non-db', 'vname' => 'LBL_ECMQUOTES' ), 'ecmpricebooks' => array( 'name' => 'ecmpricebooks', 'type' => 'link', 'relationship' => 'ecmpricebooks_ecmproducts', 'source' => 'non-db', 'vname' => 'LBL_ECMPRICEBOOKS' ), 'notes' => array( 'name' => 'notes', 'type' => 'link', 'relationship' => 'ecmproducts_notes', 'source' => 'non-db', 'vname' => 'LBL_NOTES' ), 'ecmcomponents' => array( 'name' => 'ecmcomponents', 'type' => 'link', 'relationship' => 'ecmproducts_ecmcomponents', 'source' => 'non-db', 'vname' => 'LBL_COMPONENTS' ), //add mz 2014-10-23 //sell statistic 'q1_val' => array( 'type' => 'decimal', 'name' => 'q1_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'q1_qty' => array( 'type' => 'decimal', 'name' => 'q1_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'q1_cost' => array( 'type' => 'decimal', 'name' => 'q1_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'q1_margin' => array( 'type' => 'decimal', 'name' => 'q1_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'q2_val' => array( 'type' => 'decimal', 'name' => 'q2_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'q2_qty' => array( 'type' => 'decimal', 'name' => 'q2_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'q2_cost' => array( 'type' => 'decimal', 'name' => 'q2_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'q2_margin' => array( 'type' => 'decimal', 'name' => 'q2_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'q3_val' => array( 'type' => 'decimal', 'name' => 'q3_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'q3_qty' => array( 'type' => 'decimal', 'name' => 'q3_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'q3_cost' => array( 'type' => 'decimal', 'name' => 'q3_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'q3_margin' => array( 'type' => 'decimal', 'name' => 'q3_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'q4_val' => array( 'type' => 'decimal', 'name' => 'q4_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'q4_qty' => array( 'type' => 'decimal', 'name' => 'q4_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'q4_cost' => array( 'type' => 'decimal', 'name' => 'q4_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'q4_margin' => array( 'type' => 'decimal', 'name' => 'q4_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'this_year_val' => array( 'type' => 'decimal', 'name' => 'this_year_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'this_year_qty' => array( 'type' => 'decimal', 'name' => 'this_year_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'this_year_cost' => array( 'type' => 'decimal', 'name' => 'this_year_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'this_year_margin' => array( 'type' => 'decimal', 'name' => 'this_year_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'last_year_val' => array( 'type' => 'decimal', 'name' => 'last_year_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'last_year_qty' => array( 'type' => 'decimal', 'name' => 'last_year_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'last_year_cost' => array( 'type' => 'decimal', 'name' => 'last_year_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'last_year_margin' => array( 'type' => 'decimal', 'name' => 'last_year_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'this_month_val' => array( 'type' => 'decimal', 'name' => 'this_month_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'this_month_qty' => array( 'type' => 'decimal', 'name' => 'this_month_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'this_month_cost' => array( 'type' => 'decimal', 'name' => 'this_month_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'this_month_margin' => array( 'type' => 'decimal', 'name' => 'this_month_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'last_month_val' => array( 'type' => 'decimal', 'name' => 'last_month_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'last_month_qty' => array( 'type' => 'decimal', 'name' => 'last_month_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'last_month_cost' => array( 'type' => 'decimal', 'name' => 'last_month_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'last_month_margin' => array( 'type' => 'decimal', 'name' => 'last_month_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'last_q1_val' => array( 'type' => 'decimal', 'name' => 'last_q1_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'last_q1_qty' => array( 'type' => 'decimal', 'name' => 'last_q1_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'last_q1_cost' => array( 'type' => 'decimal', 'name' => 'last_q1_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'last_q1_margin' => array( 'type' => 'decimal', 'name' => 'last_q1_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'last_q2_val' => array( 'type' => 'decimal', 'name' => 'last_q2_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'last_q2_qty' => array( 'type' => 'decimal', 'name' => 'last_q2_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'last_q2_cost' => array( 'type' => 'decimal', 'name' => 'last_q2_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'last_q2_margin' => array( 'type' => 'decimal', 'name' => 'last_q2_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'last_q3_val' => array( 'type' => 'decimal', 'name' => 'last_q3_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'last_q3_qty' => array( 'type' => 'decimal', 'name' => 'last_q3_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'last_q3_cost' => array( 'type' => 'decimal', 'name' => 'last_q3_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'last_q3_margin' => array( 'type' => 'decimal', 'name' => 'last_q3_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), 'last_q4_val' => array( 'type' => 'decimal', 'name' => 'last_q4_val', 'vname' => 'LBL_SELL_VALUE', 'len' => '10,2' ), 'last_q4_qty' => array( 'type' => 'decimal', 'name' => 'last_q4_qty', 'vname' => 'LBL_SELL_QUANTITY', 'len' => '10,2' ), 'last_q4_cost' => array( 'type' => 'decimal', 'name' => 'last_q4_cost', 'vname' => 'LBL_SELL_COST', 'len' => '10,2' ), 'last_q4_margin' => array( 'type' => 'decimal', 'name' => 'last_q4_margin', 'vname' => 'LBL_SELL_MARGIN', 'len' => '5,2' ), //end mz // FOR SUBPANELS ), // INDICES SECTION 'indices' => array( array( 'name' => 'ecmproductsspk', 'type' => 'primary', 'fields' => array( 'id' ) ), array( 'name' => 'idx_ecmproducts_name', 'type' => 'index', 'fields' => array( 'name' ) ) ), // RELATIONSHIPS SECTION 'relationships' => array( 'ecmproducts_assigned_user' => array( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EcmProducts', 'rhs_table' => 'ecmproducts', 'rhs_key' => 'assigned_user_id', 'relationship_type' => 'one-to-many' ), 'ecmproducts_modified_user' => array( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EcmProducts', 'rhs_table' => 'ecmproducts', 'rhs_key' => 'modified_user_id', 'relationship_type' => 'one-to-many' ), 'ecmproducts_created_by' => array( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EcmProducts', 'rhs_table' => 'ecmproducts', 'rhs_key' => 'created_by', 'relationship_type' => 'one-to-many' ), 'mainproduct_ecmproducts' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmProducts', 'rhs_table' => 'ecmproducts', 'rhs_key' => 'mainproduct_id', 'relationship_type' => 'one-to-many' ), 'ecmproducts_ecmstockins' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockIns', 'rhs_table' => 'ecmstockins', 'rhs_key' => 'product_id', 'relationship_type' => 'one-to-many' ), 'ecmproducts_ecmstockouts' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockOuts', 'rhs_table' => 'ecmstockouts', 'rhs_key' => 'product_id', 'relationship_type' => 'one-to-many' ), 'ecmproduct_documents' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'Documents', 'rhs_table' => 'documents', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'documents_accounts', 'join_key_lhs' => 'parent_id', 'join_key_rhs' => 'document_id', ), 'ecmproducts_ecmpurchaseorders' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmPurchaseOrders', 'rhs_table' => 'ecmpurchaseorders', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmpurchaseorderitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecmpurchaseorder_id' ), 'ecmproducts_ecmsales' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmSales', 'rhs_table' => 'ecmsales', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmsaleitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecmsale_id' ), 'ecmproducts_ecmstockdocins' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocIns', 'rhs_table' => 'ecmstockdocins', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmstockdocinitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecmstockdocin_id' ), 'ecmproducts_ecmstockdocouts' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocOuts', 'rhs_table' => 'ecmstockdocouts', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmstockdocoutitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecmstockdocout_id' ), 'ecmproducts_ecmstockdocinsideins' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocInsideIns', 'rhs_table' => 'ecmstockdocinsideins', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmstockdocinsideinitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecmstockdocinsidein_id' ), 'ecmproducts_ecmstockdoccorrects' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocCorrects', 'rhs_table' => 'ecmstockdoccorrects', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmstockdoccorrectitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecmstockdoccorrect_id' ), 'ecmproducts_ecmstockdocinsideouts' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocInsideOuts', 'rhs_table' => 'ecmstockdocinsideouts', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmstockdocinsideoutitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecmstockdocinsideout_id' ), 'ecmproducts_ecminsideorders' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmInsideOrders', 'rhs_table' => 'ecminsideorders', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecminsideorderitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecminsideorder_id' ), 'ecmproducts_ecmstockdocmoves' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocMoves', 'rhs_table' => 'ecmstockdocmoves', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmstockdocmoveitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecmstockdocmove_id' ), 'ecmproducts_ecmdeliverynotes' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmDeliveryNotes', 'rhs_table' => 'ecmdeliverynotes', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmdeliverynoteitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecmdeliverynote_id' ), 'ecmproducts_ecminvoiceouts' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmInvoiceOuts', 'rhs_table' => 'ecminvoiceouts', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecminvoiceoutitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecminvoiceout_id' ), 'ecmproducts_ecmquotes' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'EcmQuotes', 'rhs_table' => 'ecmquotes', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmquoteitems', 'join_key_lhs' => 'ecmproduct_id', 'join_key_rhs' => 'ecmquote_id' ), 'ecmpricebooks_ecmproducts' => array( 'lhs_module' => 'EcmPriceBooks', 'lhs_table' => 'ecmpricebooks', 'lhs_key' => 'id', 'rhs_module' => 'EcmProducts', 'rhs_table' => 'ecmproducts', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'ecmpricebooks_ecmproducts', 'join_key_lhs' => 'ecmpricebook_id', 'join_key_rhs' => 'ecmproduct_id' ), 'ecmproducts_notes' => array( 'lhs_module' => 'EcmProducts', 'lhs_table' => 'ecmproducts', 'lhs_key' => 'id', 'rhs_module' => 'Notes', 'rhs_table' => 'notes', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many', 'relationship_role_column' => 'parent_type', 'relationship_role_column_value' => 'EcmProducts' ) ), // THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW 'optimistic_locking' => true );