Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here
DynDeveloper.com

DynDeveloper.com

Table Edits Forum Articles
Table Edits 0 Table Edits 0 Table Edits 0
Sign Up Now!Log In
eayala68 3/8/2017 2:55:36 PM

ventas por periodo

Saludos a Todos. estoy realizando una tabla dinámica en Excel que me muestre las ventar por periodo y por año segun la  consulta que agrego al final. 

como verán estoy utilizando la tabla RM00104 . La pregunta es: el campo SMRYSALS contiene el monto de ventas con impuesto o sin impuesto?

Greetings to all. I am doing a dynamic table in Excel that shows me the sales by period and by year according to the query that I add at the end. As you will see I am using the RM00104 table. The question is: does the SMRYSALS field contain the amount of sales with tax or no tax?

select 'TIENDA 1' "Centro de Ventas" , YEAR1, PERIODID,
CASE PERIODID WHEN 1 THEN 'ENE' WHEN 2 THEN 'FEB'  WHEN 3 THEN 'MAR'  WHEN 4 THEN 'ABR'
 WHEN 5 THEN 'MAY' WHEN 6 THEN 'JUN'  WHEN 7 THEN 'JUL'  WHEN 8 THEN 'AGO'
 WHEN 9 THEN 'SEP' WHEN 10 THEN 'OCT' WHEN 11 THEN 'NOV' WHEN 12 THEN 'DIC'
 END Mes,
  sum(SMRYSALS - SMRYDISC - SMRYRTRN) "Venta Neta"
 from RM00104 WHERE HISTTYPE = 0 and CUSTNMBR like 'CL9%' AND YEAR1 > 2010
  group by YEAR1, PERIODID
 UNION ALL
 select 'TIENDA 2' "Centro de Ventas",    YEAR1, PERIODID,  
 CASE PERIODID WHEN 1 THEN 'ENE' WHEN 2 THEN 'FEB'  WHEN 3 THEN 'MAR'  WHEN 4 THEN 'ABR'
 WHEN 5 THEN 'MAY' WHEN 6 THEN 'JUN'  WHEN 7 THEN 'JUL'  WHEN 8 THEN 'AGO'
 WHEN 9 THEN 'SEP' WHEN 10 THEN 'OCT' WHEN 11 THEN 'NOV' WHEN 12 THEN 'DIC'
 END Mes,
 sum(SMRYSALS - SMRYDISC - SMRYRTRN) "Venta Neta"
 from RM00104 WHERE HISTTYPE = 0 and CUSTNMBR like 'CL1%' AND YEAR1 > 2010
  group by YEAR1, PERIODID
 UNION ALL
 select 'TIENDA 3' "Centro de Ventas" ,  YEAR1, PERIODID,  
 CASE PERIODID WHEN 1 THEN 'ENE' WHEN 2 THEN 'FEB'  WHEN 3 THEN 'MAR'  WHEN 4 THEN 'ABR'
 WHEN 5 THEN 'MAY' WHEN 6 THEN 'JUN'  WHEN 7 THEN 'JUL'  WHEN 8 THEN 'AGO'
 WHEN 9 THEN 'SEP' WHEN 10 THEN 'OCT' WHEN 11 THEN 'NOV' WHEN 12 THEN 'DIC'
 END Mes,
 sum(SMRYSALS - SMRYDISC - SMRYRTRN) "Venta Neta"
 from RM00104 WHERE HISTTYPE = 0 and CUSTNMBR like 'CL5%' AND YEAR1 > 2010
 group by YEAR1, PERIODID
 order by 2, 3

 

Version: GP 10
Section: Dynamics GP, SQL Scripts








Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables