'Valuation', 'DatasetName' => 'valuations', 'Entity' => '\Valuation\Entity\Valuation', 'References' => array( 'stock' => '\Stock\Entity\Stock', 'createdBy' => '\User\Entity\Profile', 'valuatedBy' => '\User\Entity\Profile', 'salesProfile' => '\User\Entity\Profile', 'managerProfile' => '\User\Entity\Profile', 'region' => '\Location\Entity\Region', 'city' => '\Location\Entity\Town', 'dealNotDoneSelection' => '\Valuation\Entity\DealNotDoneSelection', 'sendToStockFrom' => '\Valuation\Entity\SendToStockFrom' ), 'Dependants' => array() ); /** * @var array */ protected $metaList = array( 'Contract' => 'Recurring', 'RequireAuth' => true, 'RequiredInput' => array(), 'OptionalInput' => array( 'Filter' => array( 'created' => 'Date', 'updated' => 'Date', 'valuationNumber' => 'String12', 'stock' => 'Id', 'department' => 'Department', 'valuationNumber' => 'String12', 'createdBy' => 'Id', 'valuatedBy' => 'Id', 'salesProfile' => 'Id', 'managerProfile' => 'Id', 'firstName' => 'String50', 'familyName' => 'String50', 'idNumber' => 'IdNumber', 'mobile' => 'Mobile', 'email' => 'String250', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'jobState' => 'String25', 'type' => 'Id', 'isPublicCustomer' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', ) ), 'Filter' => array(), 'Fields' => array( 'valuationNumber', 'stock', 'department', 'createdBy', 'valuatedBy', 'salesProfile', 'managerProfile', 'firstName', 'familyName', 'jobState', 'type', 'isPublicCustomer', 'customerAddressStreet', 'customerAddressStreetName', 'customerAddressSuburb', 'customerAddressCity', 'customerAddressPostalCode' ), 'Expand' => array() ); /** * @var array */ protected $metaSelectList = array( 'Contract' => 'Recurring', 'RequireAuth' => true, 'RequiredInput' => array(), 'OptionalInput' => array( 'Filter' => array( 'created' => 'Date', 'updated' => 'Date', 'valuationNumber' => 'String12', 'stock' => 'Id', 'department' => 'Department', 'valuationNumber' => 'String12', 'createdBy' => 'Id', 'valuatedBy' => 'Id', 'salesProfile' => 'Id', 'managerProfile' => 'Id', 'firstName' => 'String50', 'familyName' => 'String50', 'idNumber' => 'IdNumber', 'mobile' => 'Mobile', 'email' => 'String250', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'jobState' => 'String25', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150' ) ), 'Filter' => array(), 'Label' => array( 'Format' => '[valuationNumber] ([firstName] [familyName])', 'Fields' => array('valuationNumber', 'firstName', 'familyName') ) ); /** * @var array */ protected $metaGrid = array( 'Type' => 'Grid', 'RequireAuth' => true, 'Export' => true, 'Builder' => '\Valuation\Report\ValuationGrid', 'Writer' => '\Utility\Export\ExcelReport', 'Output' => 'Download', 'Contract' => 'Recurring', 'Options' => array( 'Boolean' => array( 'ExportToExcel' => false ) ), 'RequiredInput' => array(), 'OptionalInput' => array( 'Grid' => array( 'NumberOfRecords' => 'Integer', 'Page' => 'Integer', 'Filter' => 'Array', 'OrderBy' => 'Array', ) ), 'Base' => 'stock', 'NumberOfRecords' => 20, 'Query' => 'SELECT [SELECTION] FROM \Valuation\Entity\Valuation valuation JOIN valuation.stock stock JOIN stock.company company JOIN stock.vehicleYear vehicleYear JOIN stock.type type JOIN type.model model JOIN model.make make LEFT JOIN valuation.dealNotDoneSelection dealNotDoneSelection LEFT JOIN valuation.sendToStockFrom sendToStockFrom LEFT JOIN company.group companyGroup LEFT JOIN company.groupDivision groupDivision LEFT JOIN valuation.createdBy createdProfile LEFT JOIN valuation.salesProfile salesProfile LEFT JOIN valuation.managerProfile managerProfile LEFT JOIN stock.exteriorColour exteriorColour LEFT JOIN stock.priceGuide priceGuide [WHERE] [ORDER]', 'Selection' => 'valuation, stock, company, companyGroup, groupDivision, exteriorColour, vehicleYear, make, model, type, salesProfile, managerProfile, priceGuide, dealNotDoneSelection, sendToStockFrom', 'Filter' => array( 'valuation.archived' => false, 'valuation.jobState' => '!=Stock' ), 'OrderBy' => array('stock.created' => 'DESC'), 'Fields' => array( 'id', 'salesProfile' => array( 'firstName', 'familyName' ), 'dealNotDoneSelection'=> array( 'name' ), 'sendToStockFrom'=> array( 'name' ), 'managerProfile' => array( 'firstName', 'familyName' ), 'stock' => array( 'referenceNumber', 'created' => 'DateTime', 'registrationNumber', 'vinNumber', 'type' => array( 'name', 'mmCode', 'model' => array( 'name', 'make' => array( 'name' ) ), ), 'vehicleYear' => array( 'name' ), 'km', 'tradePrice', 'retailPrice', 'listPrice', 'loadedOnPriceGuide', 'numberOfOffers', 'highestOffer', 'priceGuide' => array( 'id' ) ), 'amountOffered', 'jobState', 'previousState' ) ); /** * @var array */ protected $metaView = array( 'Type' => 'View', 'Expand' => array( 'model', 'make', 'type' ), 'Intersect' => array(), 'ExpandDepth' => 2 ); /** * @var array */ protected $metaCreatePublic = array( 'Type' => 'Create', 'Contract' => 'Recurring', 'Flags' => array( 'NewStockItem.FromValuation' => true, 'NewValuationItem.Status' => 'This.NewValuation' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'ExecuteBefore' => array( 'addCustomVehicles' ), 'ExecuteAfter' => array( 'sendToMobileQueue', 'sendToValuators', 'setStockLink', 'generateHistoryList', 'checkCreatedBy' ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'valuators' => 'Array', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'publicCentre' => 'Id', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaCreateCustomerPublic = array( 'Type' => 'Create', 'Contract' => 'Recurring', 'Flags' => array( 'NewStockItem.FromValuation' => true, 'NewValuationItem.Status' => 'This.NewValuation' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'ExecuteBefore' => array( 'addCustomVehicles' ), 'ExecuteAfter' => array( 'sendToMobileQueue', 'sendToValuators', 'setStockLinkCustomer', 'setStockLink', 'generateHistoryList', 'checkCreatedBy', 'sendEmailToValuator' ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'valuators' => 'Array', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'publicCentre' => 'Id', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaCreateCompleteCustomerPublic = array( 'Type' => 'Create', 'Contract' => 'Recurring', 'Flags' => array( 'NewStockItem.FromValuation' => true, 'NewValuationItem.Status' => 'This.PendingValuation' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'ExecuteBefore' => array( 'addCustomVehicles' ), 'ExecuteAfter' => array( 'sendToMobileQueue', 'sendToValuators', 'setStockLinkCustomer', 'setStockLink', 'generateHistoryList', 'checkCreatedBy', 'setAppointmentData', 'pushCreateAction' ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'valuators' => 'Array', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'valuatorSelected' => 'Id', 'dateSelected' => 'Date', 'timeSelected' => 'String150', 'timeIdSelected' => 'Id', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'publicCentre' => 'Id', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaUpdateCompleteCustomerPublic = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => false, 'Expand' => array( 'category', 'make', 'model', 'type', 'stock', 'priceGuide', 'mainImage', 'frontImage', 'rightImage', 'leftImage', 'backImage', 'interiorImage', 'engineImage', 'natisImage', 'createdBy', 'valuatedBy', 'salesProfile', 'valuators', 'region', 'city', 'company', 'contact' ), 'ExecuteBefore' => array( 'updateCustomVehicles' ), 'ExecuteAfter' => array( 'sendToMobileQueue', 'pushUpdateAction', 'setAppointmentData' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array() ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'valuators' => 'Array', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'valuatorSelected' => 'Id', 'dateSelected' => 'Date', 'timeSelected' => 'String150', 'timeIdSelected' => 'Id', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'publicCentre' => 'Id', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaCreateNew = array( 'Type' => 'Create', 'Contract' => 'Recurring', 'RequireAuth' => true, 'Flags' => array( 'NewStockItem.FromValuation' => true, 'NewValuationItem.Status' => 'This.NewValuation' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'ExecuteBefore' => array( 'addCustomVehicles' ), 'ExecuteAfter' => array( 'sendToMobileQueue', 'sendToValuators', 'setStockLink', 'generateHistoryList', 'checkCreatedBy', 'pushCreateAction' ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'valuators' => 'Array', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'publicCentre' => 'Id', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaCreatePending = array( 'Type' => 'Create', 'Contract' => 'Recurring', 'RequireAuth' => true, 'Flags' => array( 'NewStockItem.FromValuation' => true, 'NewValuationItem.Status' => 'This.PendingValuation' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'ExecuteBefore' => array( 'addCustomVehicles' ), 'ExecuteAfter' => array( 'setValuatorFromAuth', 'setStockLink', 'generateHistoryList', 'pushCreateAction' ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'sighted' => 'Boolean', 'publicCentre' => 'Id', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaCreateComplete = array( 'Type' => 'Create', 'Contract' => 'Recurring', 'RequireAuth' => true, 'Flags' => array( 'NewStockItem.FromValuation' => true, 'NewValuationItem.Status' => 'This.CompleteValuation' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'ExecuteBefore' => array( 'addCustomVehicles' ), 'ExecuteAfter' => array( 'setValuatorFromAuth', 'sendToSales', 'setStockLink', 'generateHistoryList', 'pushCreateAction' ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile', 'amountOffered' => 'Decimal', 'salesProfile' => 'Id' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'bankSettlement' => 'Decimal', 'requiredPrice' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'salesComments' => 'String500', 'customerComments' => 'String500', 'sighted' => 'Boolean', 'publicCentre' => 'Id', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaCreateCompleteSendToCustomer = array( 'Type' => 'Create', 'Contract' => 'Recurring', 'RequireAuth' => true, 'Flags' => array( 'NewStockItem.FromValuation' => true, 'NewValuationItem.Status' => 'This.CompleteValuation' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'ExecuteBefore' => array( 'addCustomVehicles' ), 'ExecuteAfter' => array( 'setValuatorFromAuth', 'setStockLink', 'generateHistoryList', 'sendPublicCustomerEmail', 'pushCreateAction' ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile', 'amountOffered' => 'Decimal', ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'bankSettlement' => 'Decimal', 'requiredPrice' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'customerComments' => 'String500', 'sighted' => 'Boolean', 'publicCentre' => 'Id', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaCreatePriceGuide = array( 'Type' => 'Create', 'Contract' => 'Recurring', 'RequireAuth' => true, 'Flags' => array( 'NewStockItem.FromValuation' => true, 'NewValuationItem.Status' => 'PriceGuide.NewItemFromValuation' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'ExecuteBefore' => array( 'addCustomVehicles', 'pushCreateAction' ), 'ExecuteAfter' => array( 'setValuatorFromAuth', 'setStockLink', 'generateHistoryList' ), 'RequiredInput' => array( 'Context' => array( 'clubs' => 'Array' ), 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaCreateStock = array( 'Type' => 'Create', 'Contract' => 'Recurring', 'RequireAuth' => true, 'ExecuteBefore' => array( 'addCustomVehicles' ), 'Flags' => array( 'NewValuationItem.Status' => 'This.Stock' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'ExecuteAfter' => array( 'setValuatorFromAuth', 'setStockLink', 'generateHistoryList', 'pushCreateAction' ), 'RequiredInput' => array( 'Stock' => array( 'stockNumber' => 'String20', 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaUpdateStock = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteBefore' => array( 'addCustomVehicles' ), 'Flags' => array( 'NewValuationItem.Status' => 'This.Stock' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'ExecuteAfter' => array( 'setValuatorFromAuth', 'setStockLink', 'generateHistoryList', 'pushUpdateAction' ), 'RequiredInput' => array( 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaUpdate = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ConditionalContract' => array( 'noEditOnPgItemWithOffers' ), 'Expand' => array( 'category', 'make', 'model', 'type', 'stock', 'priceGuide', 'mainImage', 'frontImage', 'rightImage', 'leftImage', 'backImage', 'interiorImage', 'engineImage', 'natisImage', 'createdBy', 'valuatedBy', 'salesProfile', 'valuators', 'region', 'city', 'dealNotDoneSelection', 'sendToStockFrom' ), 'ExecuteBefore' => array( 'updateCustomVehicles' ), 'ExecuteAfter' => array( 'sendToMobileQueue', 'sendToValuators', 'pushUpdateAction' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'valuators' => 'Array', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'stockNumber' => 'String20', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaUpdateCheck = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => false, 'ConditionalContract' => array( 'noEditOnPgItemWithOffers' ), 'Expand' => array( 'category', 'make', 'model', 'type', 'stock', 'priceGuide', 'mainImage', 'frontImage', 'rightImage', 'leftImage', 'backImage', 'interiorImage', 'engineImage', 'natisImage', 'createdBy', 'valuatedBy', 'salesProfile', 'valuators', 'region', 'city', 'company', 'contact' ), 'ExecuteBefore' => array( 'updateCustomVehicles' ), 'ExecuteAfter' => array( 'sendToMobileQueue', 'sendToValuators', 'pushUpdateAction' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'valuators' => 'Array', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'stockNumber' => 'String20', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaUpdateCompleteCheck = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => false, 'ConditionalContract' => array( 'noEditOnPgItemWithOffers' ), 'Expand' => array( 'category', 'make', 'model', 'type', 'stock', 'priceGuide', 'mainImage', 'frontImage', 'rightImage', 'leftImage', 'backImage', 'interiorImage', 'engineImage', 'natisImage', 'createdBy', 'valuatedBy', 'salesProfile', 'valuators', 'region', 'city', 'company', 'contact' ), 'ExecuteBefore' => array( 'updateCustomVehicles' ), 'ExecuteAfter' => array( 'sendToMobileQueue', 'pushUpdateAction' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array() ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'amountOffered' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'valuators' => 'Array', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id', 'category' => 'Id', 'make' => 'Id', 'model' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'stockNumber' => 'String20', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaLimitedUpdate = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteAfter' => array( 'pushUpdateAction' ), 'Expand' => array( 'stock', 'category', 'make', 'model', 'type', 'mainImage', 'frontImage', 'rightImage', 'leftImage', 'backImage', 'interiorImage', 'engineImage', 'natisImage', 'createdBy', 'valuatedBy', 'salesProfile' ), 'RequiredInput' => array(), 'OptionalInput' => array() ); /** * @var array */ protected $metaPriceGuideMoveToComplete = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'ExecuteAfter' => array( 'setPreviousStateToComplete', 'pushUpdateAction' ), 'RequiredInput' => array( 'Valuation' => array( 'amountOffered' => 'Decimal', 'salesProfile' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'salesComments' => 'String500', 'bankSettlement' => 'Decimal', ) ) ); /** * @var array */ protected $metaSendToSales = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteAfter' => array( 'sendToSales', 'pushUpdateAction' ), 'RequiredInput' => array( 'Valuation' => array( 'amountOffered' => 'Decimal', 'salesProfile' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'salesComments' => 'String500', 'bankSettlement' => 'Decimal', ) ) ); /** * @var array */ protected $metaSendToSalesFull = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteBefore' => array( 'updateCustomVehicles' ), 'ExecuteAfter' => array( 'sendToSales', 'pushUpdateAction' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile', 'amountOffered' => 'Decimal', 'salesProfile' => 'Id' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'salesComments' => 'String500', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaSendToCustomerFull = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteBefore' => array( 'updateCustomVehicles' ), 'ExecuteAfter' => array( 'sendPublicCustomerEmail', 'pushUpdateAction' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'RequiredInput' => array( 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile', 'amountOffered' => 'Decimal' ), 'Stock' => array( 'vehicleYear' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'bankSettlement' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'customerComments' => 'String500', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'salesProfile' => 'Id', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'type' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaSendToPriceGuide = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteBefore' => array( 'updateCustomVehicles' ), 'ExecuteAfter' => array( 'checkCreatedBy', 'pushUpdateAction' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'RequiredInput' => array( 'Context' => array( 'clubs' => 'Array' ), 'Valuation' => array( 'firstName' => 'String50', 'familyName' => 'String50', 'mobile' => 'Mobile' ), 'Stock' => array( 'vehicleYear' => 'Id', 'type' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id' ) ), 'OptionalInput' => array( 'Valuation' => array( 'department' => 'Department', 'idNumber' => 'IdNumber', 'email' => 'String250', 'region' => 'Id', 'city' => 'Id', 'street' => 'String100', 'requiredPrice' => 'Decimal', 'overAllowance' => 'Decimal', 'standInValue' => 'Decimal', 'projectedRetail' => 'Decimal', 'plannedMargin' => 'Decimal', 'sighted' => 'Boolean', 'licenseDiscExpired' => 'Boolean', 'customerAddressStreet' => 'String150', 'customerAddressStreetName' => 'String150', 'customerAddressSuburb' => 'String150', 'customerAddressCity' => 'String150', 'customerAddressPostalCode' => 'String150', 'sendToStockFrom' => 'Id', 'dealNotDoneSelection' => 'Id', 'dealNotDoneReason' => 'String150', ), 'Stock' => array( 'category' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaSendToStock = array( 'Type' => 'Update', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteBefore' => array( 'updateCustomVehicles' ), 'ExecuteAfter' => array( 'checkCreatedBy', 'pushUpdateAction' ), 'RelatedEntityFromInput' => array( 'Stock' => array( 'Workflow' => '\Stock\Workflow', 'Service' => '\Stock\Service\Stock', 'Field' => 'stock' ) ), 'RequiredInput' => array( 'Stock' => array( 'stockNumber' => 'String20' ) ), 'OptionalInput' => array( 'Stock' => array( 'jobState' => 'String25', 'category' => 'Id', 'vehicleYear' => 'Id', 'type' => 'Id', 'registrationNumber' => 'String15', 'fuelType' => 'Id', 'transmissionType' => 'Id', 'region' => 'Id', 'vinNumber' => 'String40', 'engineNumber' => 'String40', 'exteriorColour' => 'Id', 'interiorColour' => 'Id', 'condition' => 'Id', 'km' => 'Integer', 'upholstery' => 'Id', 'papers' => 'Id', 'natis' => 'Id', 'spareKeys' => 'Boolean', 'fullServiceHistory' => 'Id', 'fshNotes' => 'String500', 'tradePrice' => 'Decimal', 'retailPrice' => 'Decimal', 'listPrice' => 'Decimal', 'purchasePrice' => 'Decimal', 'salePrice' => 'Decimal', 'mainImage' => 'Id', 'frontImage' => 'Id', 'rightImage' => 'Id', 'leftImage' => 'Id', 'backImage' => 'Id', 'interiorImage' => 'Id', 'engineImage' => 'Id', 'natisImage' => 'Id', 'accessories' => 'Collection', 'accessoryNotes' => 'String500', 'damages' => 'Collection', 'damageTotal' => 'Decimal', 'previousRepairsNoted' => 'Boolean', 'previousRepairsNotes' => 'String500', 'damageNotes' => 'String500', 'coverReceived' => 'String500', 'makeManual' => 'String150', 'modelManual' => 'String150', 'typeManual' => 'String150' ) ) ); /** * @var array */ protected $metaDelete = array( 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteAfter' => array( 'pushDeleteAction' ) ); /** * @var array */ protected $metaRouteMoveToPending = array( 'Type' => 'Route', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteAfter' => array( 'pushUpdateAction' ), 'Destination' => 'This.PendingValuation', 'Surrogate' => 'metaUpdate' ); /** * @var array */ protected $metaRouteMoveToComplete = array( 'Type' => 'Route', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteAfter' => array( 'pushUpdateAction' ), 'Destination' => 'This.CompleteValuation', 'Surrogate' => 'metaSendToSalesFull' ); /** * @var array */ protected $metaRouteMoveToCustomerComplete = array( 'Type' => 'Route', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'Destination' => 'This.CompleteValuation', 'Surrogate' => 'metaSendToCustomerFull' ); /** * @var array */ protected $metaRouteSendToStock = array( 'Type' => 'Route', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'Destination' => 'Stock.Handover', 'Surrogate' => 'metaSendToStock' ); /** * @var array */ protected $metaRouteSendToPriceGuide = array( 'Type' => 'Route', 'Contract' => 'UseOnce', 'RequireAuth' => true, 'ExecuteAfter' => array( 'pushUpdateAction' ), 'Destination' => 'PriceGuide.NewItemFromValuation', 'Surrogate' => 'metaSendToPriceGuide' ); /** * Dynamic filtering. */ public function __construct() { $authData = \Utility\Registry::getAuthData(); switch (\Utility\Registry::getUserType()) { case 'B4C User': $groupFilter = \Utility\Registry::getSudo('Group', false); if ($groupFilter) { $this->metaGrid['Filter']['IDENTITY(company.group)'] = $groupFilter; } $divisionFilter = \Utility\Registry::getSudo('Division', false); if ($divisionFilter) { $this->metaGrid['Filter']['IDENTITY(company.groupDivision)'] = $divisionFilter; } $companyFilter = \Utility\Registry::getSudo('Company', false); if ($companyFilter) { $this->metaGrid['Filter']['company.id'] = $companyFilter; } break; case 'Group User': $this->metaGrid['Filter']['IDENTITY(company.group)'] = $authData['company']['group']['id']; $divisionFilter = \Utility\Registry::getSudo('Division', false); if ($divisionFilter) { $this->metaGrid['Filter']['IDENTITY(company.groupDivision)'] = $divisionFilter; } $companyFilter = \Utility\Registry::getSudo('Company', false); if ($companyFilter) { $this->metaGrid['Filter']['company.id'] = $companyFilter; } break; case 'Dealer Principle': $this->metaGrid['Filter']['IDENTITY(company.groupDivision)'] = $authData['company']['groupDivision']['id']; $companyFilter = \Utility\Registry::getSudo('Company', false); if ($companyFilter) { $this->metaGrid['Filter']['company.id'] = $companyFilter; } break; case 'Dealership Sales': $this->metaGrid['Filter']['company.id'] = $authData['company']['id']; $this->metaGrid['Filter']['Sales'] = array( 'createdProfile.id' => $authData['id'], 'salesProfile.id' => $authData['id'] ); break; default: $this->metaGrid['Filter']['company.id'] = $authData['company']['id']; break; } } }