2 @message |
firebird.qa.plugin.ExecutionError: ISQL execution failed
LOG DETAILS:
2024-05-09 21:54:22.806
2024-05-09 21:54:22.806 act = <firebird.qa.plugin.Action object at [hex]>
2024-05-09 21:54:22.806
2024-05-09 21:54:22.806 @pytest.mark.version('>=3')
2024-05-09 21:54:22.806 def test_1(act: Action):
2024-05-09 21:54:22.806 act.expected_stdout = expected_stdout
2024-05-09 21:54:22.806 > act.isql(switches=[],
2024-05-09 21:54:22.806 input=test_script % act.db.dsn, connect_db=False, charset='WIN1251')
2024-05-09 21:54:22.806 E firebird.qa.plugin.ExecutionError: ISQL execution failed
2024-05-09 21:54:22.806
2024-05-09 21:54:22.806 tests\bugs\core_1291_test.py:884: ExecutionError
2024-05-09 21:54:22.806 -------------------------- Captured ISQL stdout call --------------------------
2024-05-09 21:54:22.806 Procedure text:
2024-05-09 21:54:22.806 =============================================================================
2024-05-09 21:54:22.806 DECLARE VARIABLE NDSDiv DOUBLE PRECISION;
2024-05-09 21:54:22.806 DECLARE VARIABLE ID_ExportFieldDoc Integer;
2024-05-09 21:54:22.806 begin
2024-05-09 21:54:22.806 SELECT Val FROM TBL_Const_Float
2024-05-09 21:54:22.806 WHERE Name='NDSDiv'
2024-05-09 21:54:22.806 INTO :NDSDiv;
2024-05-09 21:54:22.806 FOR SELECT id_exportfielddoc, accountcredit, accountdebit FROM tbl_exportentry
2024-05-09 21:54:22.806 WHERE id_exportgroupentry=:id_group
2024-05-09 21:54:22.806 INTO :id_exportfielddoc, :accountcredit, :accountdebit
2024-05-09 21:54:22.806 DO BEGIN
2024-05-09 21:54:22.807 IF ((AccountCredit<>0) or (AccountDebit<>0)) THEN BEGIN
2024-05-09 21:54:22.807 IF (id_exportfielddoc=110) THEN BEGIN
2024-05-09 21:54:22.807 SELECT SUM(A.PriceRub*B.Volume/A.PointMul), SUM(A.PriceDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.807 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.807 TBL_ITEMSALE C,
2024-05-09 21:54:22.807 TBL_INDOC D
2024-05-09 21:54:22.807 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.807 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.807 INTO :summrus, :summdoc;
2024-05-09 21:54:22.807 END
2024-05-09 21:54:22.807 IF (id_exportfielddoc=111) THEN BEGIN
2024-05-09 21:54:22.807 SELECT SUM(A.PriceCalcRub*B.Volume/A.PointMul), SUM(A.PriceCalcDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.807 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.807 TBL_ITEMSALE C,
2024-05-09 21:54:22.807 TBL_INDOC D
2024-05-09 21:54:22.807 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.807 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.808 INTO :summrus, :summdoc;
2024-05-09 21:54:22.808 END
2024-05-09 21:54:22.808 IF (id_exportfielddoc=112) THEN BEGIN
2024-05-09 21:54:22.808 SELECT SUM(A.SummDoc), SUM(A.SummDoc) FROM TBL_OUTDOC_TEMP A,
2024-05-09 21:54:22.808 TBL_ITEMSALE B,
2024-05-09 21:54:22.808 TBL_INDOC_TEMP C,
2024-05-09 21:54:22.808 TBL_INDOC D
2024-05-09 21:54:22.808 WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and
2024-05-09 21:54:22.808 d.id_indoc=c.id_indoc and d.doctype = 6
2024-05-09 21:54:22.808 INTO :summrus, :summdoc;
2024-05-09 21:54:22.808 END
2024-05-09 21:54:22.808 IF (id_exportfielddoc=113) THEN BEGIN
2024-05-09 21:54:22.808 SELECT SUM(A.NDS*A.PriceRub*B.Volume/(A.PointMul*100)), SUM(A.NDS*A.PriceDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.808 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.808 TBL_ITEMSALE C,
2024-05-09 21:54:22.808 TBL_INDOC D
2024-05-09 21:54:22.808 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.808 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.808 INTO :summrus, :summdoc;
2024-05-09 21:54:22.808 END
2024-05-09 21:54:22.808 IF (id_exportfielddoc=114) THEN BEGIN
2024-05-09 21:54:22.808 SELECT SUM(A.NDS*A.PriceCalcRub*B.Volume/(A.PointMul*100)), SUM(A.NDS*A.PriceCalcDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.808 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.808 TBL_ITEMSALE C,
2024-05-09 21:54:22.808 TBL_INDOC D
2024-05-09 21:54:22.809 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.809 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.809 INTO :summrus, :summdoc;
2024-05-09 21:54:22.809 END
2024-05-09 21:54:22.809 IF (id_exportfielddoc=115) THEN BEGIN
2024-05-09 21:54:22.809 SELECT SUM(A.SummNDSDoc), SUM(A.SummNDSDoc) FROM TBL_OUTDOC_TEMP A,
2024-05-09 21:54:22.809 TBL_ITEMSALE B,
2024-05-09 21:54:22.809 TBL_INDOC_TEMP C,
2024-05-09 21:54:22.809 TBL_INDOC D
2024-05-09 21:54:22.809 WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and
2024-05-09 21:54:22.809 d.id_indoc=c.id_indoc and d.doctype = 6
2024-05-09 21:54:22.809 INTO :summrus, :summdoc;
2024-05-09 21:54:22.809 END
2024-05-09 21:54:22.809 IF (id_exportfielddoc=116) THEN BEGIN
2024-05-09 21:54:22.809 SELECT SUM((A.PriceRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM((A.PriceDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.809 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.809 TBL_ITEMSALE C,
2024-05-09 21:54:22.809 TBL_INDOC D
2024-05-09 21:54:22.809 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.809 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.809 INTO :summrus, :summdoc;
2024-05-09 21:54:22.809 END
2024-05-09 21:54:22.809 IF (id_exportfielddoc=117) THEN BEGIN
2024-05-09 21:54:22.809 SELECT SUM((A.PriceCalcRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM((A.PriceCalcDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.810 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.810 TBL_ITEMSALE C,
2024-05-09 21:54:22.810 TBL_INDOC D
2024-05-09 21:54:22.810 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.810 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.810 INTO :summrus, :summdoc;
2024-05-09 21:54:22.810 END
2024-05-09 21:54:22.810 IF (id_exportfielddoc=118) THEN BEGIN
2024-05-09 21:54:22.810 SELECT SUM(A.SummWithNDSDoc), SUM(A.SummWithNDSDoc) FROM TBL_OUTDOC_TEMP A,
2024-05-09 21:54:22.810 TBL_ITEMSALE B,
2024-05-09 21:54:22.810 TBL_INDOC_TEMP C,
2024-05-09 21:54:22.810 TBL_INDOC D
2024-05-09 21:54:22.810 WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and
2024-05-09 21:54:22.810 d.id_indoc=c.id_indoc and d.doctype = 6
2024-05-09 21:54:22.810 INTO :summrus, :summdoc;
2024-05-09 21:54:22.810 END
2024-05-09 21:54:22.810 IF (id_exportfielddoc=119) THEN BEGIN
2024-05-09 21:54:22.810 SELECT SUM((A.PriceCalcRub-A.PriceRub)*B.Volume/A.PointMul), SUM((A.PriceCalcDoc-A.PriceDoc)*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.810 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.810 TBL_ITEMSALE C,
2024-05-09 21:54:22.810 TBL_INDOC D
2024-05-09 21:54:22.810 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.810 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.810 INTO :summrus, :summdoc;
2024-05-09 21:54:22.810 END
2024-05-09 21:54:22.811 IF (id_exportfielddoc=120) THEN BEGIN
2024-05-09 21:54:22.811 SELECT SUM(B.SummDoc-(A.PriceRub*B.Volume/A.PointMul)), SUM(B.SummDoc-(A.PriceDoc*B.Volume/A.PointMul)) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.811 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.811 TBL_ITEMSALE C,
2024-05-09 21:54:22.811 TBL_INDOC D
2024-05-09 21:54:22.811 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.811 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.811 INTO :summrus, :summdoc;
2024-05-09 21:54:22.811 END
2024-05-09 21:54:22.811 IF (id_exportfielddoc=121) THEN BEGIN
2024-05-09 21:54:22.811 SELECT SUM(A.NDS*(A.PriceCalcRub-A.PriceRub)*B.Volume/(A.PointMul*100)), SUM(A.NDS*(A.PriceCalcDoc-A.PriceDoc)*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.811 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.811 TBL_ITEMSALE C,
2024-05-09 21:54:22.811 TBL_INDOC D
2024-05-09 21:54:22.811 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.811 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.811 INTO :summrus, :summdoc;
2024-05-09 21:54:22.811 END
2024-05-09 21:54:22.811 IF (id_exportfielddoc=122) THEN BEGIN
2024-05-09 21:54:22.811 SELECT SUM(B.SummNDSDoc-A.NDS*A.PriceRub*B.Volume/(A.PointMul*100)), SUM(B.SummNDSDoc-A.NDS*A.PriceDoc*B.Volume/(A.PointMul*100)) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.811 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.811 TBL_ITEMSALE C,
2024-05-09 21:54:22.811 TBL_INDOC D
2024-05-09 21:54:22.811 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.811 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.812 INTO :summrus, :summdoc;
2024-05-09 21:54:22.812 END
2024-05-09 21:54:22.812 IF (id_exportfielddoc=123) THEN BEGIN
2024-05-09 21:54:22.812 SELECT SUM(((A.PriceCalcRub-A.PriceRub)*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM(((A.PriceCalcDoc-A.PriceDoc)*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.812 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.812 TBL_ITEMSALE C,
2024-05-09 21:54:22.812 TBL_INDOC D
2024-05-09 21:54:22.812 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.812 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.812 INTO :summrus, :summdoc;
2024-05-09 21:54:22.812 END
2024-05-09 21:54:22.812 IF (id_exportfielddoc=124) THEN BEGIN
2024-05-09 21:54:22.812 SELECT SUM(B.SummWithNDSDoc-(A.PriceRub*B.Volume/A.PointMul)*(1+A.NDS/100)), SUM(B.SummWithNDSDoc-(A.PriceDoc*B.Volume/A.PointMul)*(1+A.NDS/100)) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.812 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.812 TBL_ITEMSALE C,
2024-05-09 21:54:22.812 TBL_INDOC D
2024-05-09 21:54:22.812 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.812 d.id_indoc=a.id_indoc and d.doctype = 6
2024-05-09 21:54:22.812 INTO :summrus, :summdoc;
2024-05-09 21:54:22.812 END
2024-05-09 21:54:22.812
2024-05-09 21:54:22.812 IF (id_exportfielddoc=125) THEN BEGIN
2024-05-09 21:54:22.812 SELECT SUM(A.PriceRub*B.Volume/A.PointMul), SUM(A.PriceDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.812 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.812 TBL_ITEMSALE C,
2024-05-09 21:54:22.813 TBL_INDOC D
2024-05-09 21:54:22.813 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.813 d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds=0
2024-05-09 21:54:22.813 INTO :summrus, :summdoc;
2024-05-09 21:54:22.813 END
2024-05-09 21:54:22.813 IF (id_exportfielddoc=126) THEN BEGIN
2024-05-09 21:54:22.813 SELECT SUM(A.PriceCalcRub*B.Volume/A.PointMul), SUM(A.PriceCalcDoc*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.813 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.813 TBL_ITEMSALE C,
2024-05-09 21:54:22.813 TBL_INDOC D
2024-05-09 21:54:22.813 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.813 d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds=0
2024-05-09 21:54:22.813 INTO :summrus, :summdoc;
2024-05-09 21:54:22.813 END
2024-05-09 21:54:22.813 IF (id_exportfielddoc=127) THEN BEGIN
2024-05-09 21:54:22.813 SELECT SUM(A.SummDoc), SUM(A.SummDoc) FROM TBL_OUTDOC_TEMP A,
2024-05-09 21:54:22.813 TBL_ITEMSALE B,
2024-05-09 21:54:22.813 TBL_INDOC_TEMP C,
2024-05-09 21:54:22.813 TBL_INDOC D
2024-05-09 21:54:22.813 WHERE A.ID_OUTDOC=:id_outdoc and b.id_itemsale=a.id_itemsale and c.id_indoc_temp=b.id_firstindoc_temp and
2024-05-09 21:54:22.813 d.id_indoc=c.id_indoc and d.doctype = 6 and a.nds=0
2024-05-09 21:54:22.813 INTO :summrus, :summdoc;
2024-05-09 21:54:22.813 END
2024-05-09 21:54:22.813 IF (id_exportfielddoc=128) THEN BEGIN
2024-05-09 21:54:22.813 SELECT SUM((A.PriceCalcRub-A.PriceRub)*B.Volume/A.PointMul), SUM((A.PriceCalcDoc-A.PriceDoc)*B.Volume/A.PointMul) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.813 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.815 TBL_ITEMSALE C,
2024-05-09 21:54:22.815 TBL_INDOC D
2024-05-09 21:54:22.815 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.815 d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds=0
2024-05-09 21:54:22.815 INTO :summrus, :summdoc;
2024-05-09 21:54:22.815 END
2024-05-09 21:54:22.815 IF (id_exportfielddoc=129) THEN BEGIN
2024-05-09 21:54:22.815 SELECT SUM(B.SummDoc-(A.PriceRub*B.Volume/A.PointMul)), SUM(B.SummDoc-(A.PriceDoc*B.Volume/A.PointMul)) FROM TBL_INDOC_TEMP A,
2024-05-09 21:54:22.815 TBL_OUTDOC_TEMP B,
2024-05-09 21:54:22.815 TBL_ITEMSALE C,
2024-05-09 21:54:22.816 TBL_INDOC D
2024-05-09 21:54:22.816 WHERE b.id_outdoc=:id_outdoc and b.id_itemsale=c.id_itemsale and c.id_firstindoc_temp=a.id_indoc_temp and
2024-05-09 21:54:22.816 d.id_indoc=a.id_indoc and d.doctype = 6 and b.nds=0
2024-05-09 21:54:22.816 INTO :summrus, :summdoc;
2024-05-09 21:54:22.816 END
2024-05-09 21:54:22.816 IF ((id_exportfielddoc>129)and(id_exportfielddoc<145)) THEN BEGIN
2024-05-09 21:54:22.816 execute procedure prc_expsumm_8_10 ( id_exportfielddoc, id_outdoc, NDSDiv ) returning_values( summrus, summdoc );
2024-05-09 21:54:22.816 END
2024-05-09 21:54:22.816 IF ((id_exportfielddoc>144)and(id_exportfielddoc<160)) THEN BEGIN
2024-05-09 21:54:22.816 execute procedure prc_expsumm_8_20 ( id_exportfielddoc, id_outdoc, NDSDiv ) returning_values( summrus, summdoc );
2024-05-09 21:54:22.816 END
2024-05-09 21:54:22.816 IF ((SummRus>0) or (SummDoc>0)) THEN SUSPEND;
2024-05-09 21:54:22.816 END
2024-05-09 21:54:22.816 END
2024-05-09 21:54:22.816 END
2024-05-09 21:54:22.816 =============================================================================
2024-05-09 21:54:22.816 Parameters:
2024-05-09 21:54:22.816 ID_INDOC INPUT INTEGER
2024-05-09 21:54:22.816 ID_OUTDOC INPUT INTEGER
2024-05-09 21:54:22.816 ID_GROUP INPUT INTEGER
2024-05-09 21:54:22.816 ACCOUNTCREDIT OUTPUT INTEGER
2024-05-09 21:54:22.816 ACCOUNTDEBIT OUTPUT INTEGER
2024-05-09 21:54:22.816 SUMMRUS OUTPUT DOUBLE PRECISION
2024-05-09 21:54:22.816 SUMMDOC OUTPUT DOUBLE PRECISION
2024-05-09 21:54:22.816
2024-05-09 21:54:22.822 -------------------------- Captured ISQL stderr call --------------------------
2024-05-09 21:54:22.822 Use CONNECT or CREATE DATABASE to specify a database
|