PANTHEON™ Help

 Toc
 PANTHEON Help - Welcome
[Collapse]PANTHEON
 [Collapse]Guides for PANTHEON
  [Collapse]Guide for PANTHEON
   [Collapse]Settings
    [Expand]Subjects
    [Collapse]Items
      SLOPAK Packaging Classification
      Environmental Duties
     [Expand]Items
     [Expand]Item Types
     [Expand]Item Categories
     [Expand]Units of Measurement
     [Collapse]Pricing Formulas
       Using SQL Expression in Formula
       Pricing Hierarchy
       Using Stored Procedures in Pricing Formulas
       Formula z uporabo SQL izraza
      Import Price List
     [Expand]Serial Number Templates
      Quick Pricing
     [Expand]Fixed Prices
      Find Item
     [Expand]TouchScreen Profiles
      Packaging and Packaging Waste
      Waste Materials
      Šifrant vrst odpadnega materiala
      Šifranti okoljskih dajatev
    [Expand]POS
    [Expand]Manufacturing
    [Expand]Personnel
     Calendar
    [Expand]Financials
    [Expand]Customs
    [Expand]Program
    [Expand]Documentation
    [Expand]Change User
   [Expand]Orders
   [Expand]Goods
   [Expand]Manufacturing
   [Expand]POS
   [Expand]Service
   [Expand]Financials
   [Expand]Personnel
   [Expand]Analytics
   [Expand]Desktop
   [Expand]Help
   [Expand]Messages and Warnings
   [Expand]Additional programs
   [Expand]Old products
  [Expand]Guide for PANTHEON Retail
  [Expand]Guide for PANTHEON Vet
  [Expand]Guide for PANTHEON Farming
 [Collapse]User Manuals for PANTHEON
  [Expand]User Manual for PANTHEON
  [Expand]User Manual for PANTHEON Retail
  [Expand]User manual for PANTHEON Vet
  [Expand]User Manual for PANTHEON Farming
[Collapse]PANTHEON Web
 [Collapse]Guides for PANTHEON Web
  [Expand]Guide for PANTHEON Web Light
  [Expand]Guide for PANTHEON Web Terminal
  [Expand]Guide for PANTHEON Web Legal
  [Expand]Old products Archive
 [Collapse]User Manuals for PANTHEON Web
  [Expand]Getting started PANTHEON Web
  [Expand]User Manual for PANTHEON Web Light
  [Expand]User Manual for PANTHEON Web Terminal
  [Expand]User Manual for PANTHEON Web Legal
  [Expand]Old products Archive
[Collapse]PANTHEON Granules
 [Collapse]Guides for PANTHEON Granules
  [Expand]Personnel Granule
  [Expand]Travel Orders Granule
  [Expand]Documents and Tasks Granule
  [Expand]Dashboard Granule
  [Expand]B2B Orders Granule
  [Expand]Field Service Granule
  [Expand]Fixed Assets Inventory Granule
  [Expand]Warehouse Inventory Granule
 [Collapse]User Manuals for PANTHEON Granules
  [Expand]Getting started
  [Expand]Personnel Granule
  [Expand]Travel Orders Granule
  [Expand]Documents and Tasks Granule
  [Expand]B2B Orders Granule
  [Expand]Dashboard Granule
  [Expand]Field Service Granule
  [Expand]Fixed Assets Inventory Granule
  [Expand]Warehouse Inventory Granule
  [Expand]Archive
[Expand]User Site

Load Time: 468.7412 ms
"
  4540 | 5249 | 338388 | Updated
Label

Using Stored Procedures in Pricing Formulas

Using Stored Procedures in Pricing Formulas

010379.gif010380.gif010381.gif010411.gif010382.gif010383.gif

 

Instead of set variables (see Pricing Formulas) you can perform pricing also by creating a stored procedure.

Enter the following in the Formula field:

exec <name of procedure>


e.g.
46627.gif

The procedure needs to contain the following parameters:

create procedure _MojIzracunCene
@cTip char(2) 'I' regular sales
'P' regular purchase

@cCenRazred char(1) <- SUBJEKT.CENRAZRED subject's pricing level
@cKupec char(30) <- SUBJEKT.NAZIV subject for which you are trying to perform pricing (you can put it inside '')
@cSkladisce char(30)<- SUBJEKT.NAZIV warehouse for which separate pricing is set(you can put it inside '')
@cIdent char(16) <- MS.IDENT item for which you are trying to perform pricing
@cgValuta char(3) the currency used in pricing
@dgDatum datetime date and time (it is used when looking up contract prices)
@nKolicina decimal(19, 6) quantity
@cKolicina char(1) 'T' = used only if variable for quantity is included in formula
'F' = used always
as

--Returns RecordSet with price and discount

set nocount on

declare
@nVrniCena Float,
@nVrniRabat Float

set @nVrniCena = 0
set @nVrniRabat = 0

select @nVrniCena = MpCena * 2
from MS
where Ident = @cIdent

select @nVrniCena, @nVrniRabat


 

Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!