[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/modules/Vendors/models/ -> Record.php (source)

   1  <?php
   2  /*+***********************************************************************************
   3   * The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9   *************************************************************************************/
  10  
  11  class Vendors_Record_Model extends Vtiger_Record_Model {
  12  
  13  	function getCreatePurchaseOrderUrl() {
  14          $purchaseOrderModuleModel = Vtiger_Module_Model::getInstance('PurchaseOrder');
  15  
  16          return "index.php?module=".$purchaseOrderModuleModel->getName()."&view=".$purchaseOrderModuleModel->getEditViewName()."&vendor_id=".$this->getId();
  17      }
  18  
  19      /**
  20       * Function to get List of Fields which are related from Vendors to Inventyory Record
  21       * @return <array>
  22       */
  23  	public function getInventoryMappingFields() {
  24          return array(
  25                  //Billing Address Fields
  26                  array('parentField'=>'city', 'inventoryField'=>'bill_city', 'defaultValue'=>''),
  27                  array('parentField'=>'street', 'inventoryField'=>'bill_street', 'defaultValue'=>''),
  28                  array('parentField'=>'state', 'inventoryField'=>'bill_state', 'defaultValue'=>''),
  29                  array('parentField'=>'postalcode', 'inventoryField'=>'bill_code', 'defaultValue'=>''),
  30                  array('parentField'=>'country', 'inventoryField'=>'bill_country', 'defaultValue'=>''),
  31                  array('parentField'=>'pobox', 'inventoryField'=>'bill_pobox', 'defaultValue'=>''),
  32  
  33                  //Shipping Address Fields
  34                  array('parentField'=>'street', 'inventoryField'=>'ship_street', 'defaultValue'=>''),
  35                  array('parentField'=>'city', 'inventoryField'=>'ship_city', 'defaultValue'=>''),
  36                  array('parentField'=>'state', 'inventoryField'=>'ship_state', 'defaultValue'=>''),
  37                  array('parentField'=>'postalcode', 'inventoryField'=>'ship_code', 'defaultValue'=>''),
  38                  array('parentField'=>'country', 'inventoryField'=>'ship_country', 'defaultValue'=>''),
  39                  array('parentField'=>'pobox', 'inventoryField'=>'ship_pobox', 'defaultValue'=>'')
  40          );
  41      }
  42  }


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1