on 03-30-2013 2:29 PM
Cordial Saludo
en este momento se estan vendiendo productos con un iva del 16% y otros con un iva del 5% el campo que encuentro dentro de la base de datos es el de iva en su totalidad he intentado con un formato en PLD y no encuentro la formula para hacerlo de igual manera en crystal
de que manera puedo totalizar por separado total iva 16% total iva 5%
si alguien tiene la formula le estare muy agradecido
Inserta este query en crystal como sub reporte, y lo ligas a tu reporte.
Es para facturas con impuestos con varias tasas%
OJO: Lo tomé del foro, ver nota:
SELECT TMP1.BASE * (1 - (OINV.DISCPRCNT/100)) [BASE], TMP1.TOTAL, TMP1.VATPRCNT, TMP1.TAXCODE
FROM (
SELECT SUM(LINETOTAL) AS 'BASE', SUM(VATSUM) AS 'TOTAL', VATPRCNT, TAXCODE
FROM INV1
WHERE DOCENTRY = '{?DocKey2@}'
GROUP BY VATGROUP, VATPRCNT, TAXCODE
) TMP1, OINV
WHERE OINV.DOCENTRY = '{?DocKey2@}'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola,
Yo lo he hecho haciendo un subinforme con la siguiente consulta (en este caso es para la factura de cliente pero te serviría para todos los documentos, sólo tienes que cambiar la tabla):
SELECT TMP1.BASE * (1 - (OINV.DISCPRCNT/100)) [BASE], TMP1.TOTAL, TMP1.VATPRCNT
FROM (
SELECT SUM(LINETOTAL) AS 'BASE', SUM(VATSUM) AS 'TOTAL', VATPRCNT
FROM INV1
WHERE DOCENTRY = '{?DocKey2@}'
GROUP BY VATGROUP, VATPRCNT
) TMP1, OINV
WHERE OINV.DOCENTRY = '{?DocKey2@}'
Donde '{?DocKey2@}' es el parámetro que hace referencia al documento que estoy mostrando y es es el parámetro que vinculamos con el informe principal.
Te muestro el subinforme, de esta manera da igual los impuestos diferentes que tengas, el Crystal te mostrará una línea para cada uno
Espero que te sirva, yo lo utilizo para todos los documentos en Crystal Reports
Un saludo,
Tere
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
9 | |
9 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.