refactor: refs #8153 Optimized order_getTax #3188
|
@ -9,6 +9,7 @@ BEGIN
|
||||||
* @param vOrder El identificador del pedido
|
* @param vOrder El identificador del pedido
|
||||||
* @return tmp.orderTax Bases imponibles, IVA y recargo de equivalencia
|
* @return tmp.orderTax Bases imponibles, IVA y recargo de equivalencia
|
||||||
*/
|
*/
|
||||||
|
-- No poner create or replace, ya que da problemas
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.addressCompany;
|
DROP TEMPORARY TABLE IF EXISTS tmp.addressCompany;
|
||||||
CREATE TEMPORARY TABLE tmp.addressCompany
|
CREATE TEMPORARY TABLE tmp.addressCompany
|
||||||
(INDEX (addressFk, companyFk))
|
(INDEX (addressFk, companyFk))
|
||||||
|
@ -55,7 +56,9 @@ BEGIN
|
||||||
HAVING taxableBase
|
HAVING taxableBase
|
||||||
ORDER BY bp.priority;
|
ORDER BY bp.priority;
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.orderAmount
|
-- No poner create or replace, ya que da problemas
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS tmp.orderAmount;
|
||||||
|
CREATE TEMPORARY TABLE tmp.orderAmount
|
||||||
(INDEX (orderFk))
|
(INDEX (orderFk))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT orderFk, taxableBase, `code`,
|
SELECT orderFk, taxableBase, `code`,
|
||||||
|
|
Loading…
Reference in New Issue