User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
en:devel:cbproductprice [2019/04/04 14:22]
joebordes
en:devel:cbproductprice [2019/04/04 16:10]
joebordes
Line 1: Line 1:
 ====== coreBOS Product/​Price Enhancements ====== ====== coreBOS Product/​Price Enhancements ======
 +
 +===== Entity Relation =====
  
   * {{ :​en:​devel:​cbproductpriceer.pdf | Entity Relation Diagram}}   * {{ :​en:​devel:​cbproductpriceer.pdf | Entity Relation Diagram}}
   * {{ :​en:​devel:​cbproductpriceer.odg | Entity Relation Diagram}}   * {{ :​en:​devel:​cbproductpriceer.odg | Entity Relation Diagram}}
 +
 +===== Services =====
 +
 +Given a Sales Product, we can call these methods:
 +
 +  * **getCategory** ($date='​*',​$primary='​*'​):​ array of categories the product belongs to on the given date, if primary is given then only primary categories will be returned
 +  * **getFeatures** ($date='​*',​ $available='​*',​ $default='​*',​ $accid=0, $availablegeobid=0,​ $pricegeobid=0,​ $rotacion=0,​ $currencyid=1,​ $oferta=0): array of all the features of the product that fulfill the given parameters
 +  * **getPriceDetails** ($date='​*',​$accid=0,​$geobid=0,​$apply='​*',​ $context): this is the main price retrieval service, it will return any price type ($apply) and will also apply a coreBOS rule that can be selected on the price record itself. The $context array will be passed into the rule along with the information of the price
 +    * **getBasePrice** ($date='​*',​$accid=0,​$geobid=0,​ $context): calls getPriceDetails with apply=Base
 +    * **getCost** ($date='​*',​$accid=0,​$geobid=0,​ $context): calls getPriceDetails with apply=Cost
 +    * **getSurcharge** ($date='​*',​$accid=0,​$geobid=0,​ $context): calls getPriceDetails with apply=Surcharge
 +    * **getMaterial** ($date='​*',​$accid=0,​$geobid=0,​ $context): calls getPriceDetails with apply=Material
 +    * **getDiscount** ($date = '​*',​ $accid = 0, $geobid = 0, $context = false): calls getPriceDetails with apply=Discount
 +  * **getPriceInformation** ($date='​*',​$accid=0,​$geobid=0,​$apply='​*',​$currencyid=1,​ $context=false):​ calls getPriceDetails for all the possible types and returns the results
  
 Feature: Feature:
Line 15: Line 31:
   * function getInteractions($spid) {   * function getInteractions($spid) {
  
-Sales Product 
- 
-  * function getCategory($date='​*',​$primary='​*'​) { 
-  * function getFeatures($date='​*',​ $available='​*',​ $default='​*',​ $accid=0, $availablegeobid=0,​ $pricegeobid=0,​ $rotacion=0,​ $currencyid=1,​ $oferta=0) { 
-  * function getBasePrice($date='​*',​$accid=0,​$geobid=0,​ $context) { 
-  * function getCost($date='​*',​$accid=0,​$geobid=0,​ $context) { 
-  * function getSurcharge($date='​*',​$accid=0,​$geobid=0,​ $context) { 
-  * function getMaterial($date='​*',​$accid=0,​$geobid=0,​ $context) { 
-  * function getDiscount($date = '​*',​ $accid = 0, $geobid = 0, $context = false) { 
-  * function getPriceInformation($date='​*',​$accid=0,​$geobid=0,​$apply='​*',​$currencyid=1,​ $context=false) { 
-  * function getPriceDetails($date='​*',​$accid=0,​$geobid=0,​$apply='​*',​ $context) { 
  
 Product Association Product Association