#13: formular de facturare unificat - etapa curenta
Squash al branch-ului de lucru plan13-s2. Clase: ofacturare (nucleul formularului unificat), ofacturare_comun, ferestre_cere_date, ocomenzi, caut_ora (lista de preturi in combo-urile de cautare), omodificari. Programe: ofacturare impartit - ofacturare_antet, ofacturare_rutare_scriere si ogrid_latimi sunt fisiere noi; oproceduri_facturare primeste discountul pe linie si cota standard de TVA cand articolul nu are cota pe politica. Documentatie: capcana SQLExec no_data_found, conventia de encoding, depanarea testelor VFP si regulile de lucru - conflictele cu modificarile venite din alte proiecte sunt rezolvate pastrand ambele parti. Loguri de rulare a testelor scoase din versionare; testele raman. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkyjGyrV2S7932om4kfSiK
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
* Utilizare: DO test_init_env_auto_roafacturare WITH 'CENTRAL', 'MARIUSM_AUTO', 'parola'
|
||||
* ATENTIE: mentine sincronizat cu test_init_env_auto.prg pentru partea comuna.
|
||||
|
||||
LPARAMETERS tcHost, tcSchema, tcPassword, tnAn, tnLuna
|
||||
LPARAMETERS tcHost, tcSchema, tcPassword, tnAn, tnLuna, tnIdFirma
|
||||
|
||||
tcHost = IIF(EMPTY(tcHost), 'CENTRAL', tcHost)
|
||||
tcSchema = IIF(EMPTY(tcSchema), 'MARIUSM_AUTO', tcSchema)
|
||||
@@ -32,8 +32,9 @@ PUBLIC CT_SUCCES, CT_INSUCCES, crlf, gnAn, gnLuna, gnIdUtil, glEMama, gnIdFirma,
|
||||
CT_SUCCES = 1
|
||||
CT_INSUCCES = -1
|
||||
crlf = CHR(13) + CHR(10)
|
||||
gnAn = IIF(EMPTY(tnAn), YEAR(DATE()), tnAn)
|
||||
gnLuna = IIF(EMPTY(tnLuna), MONTH(DATE()), tnLuna)
|
||||
* luna de lucru a suitei e fixa, independenta de Date() sau de randul curent din CALENDAR
|
||||
gnAn = IIF(EMPTY(tnAn), 2026, tnAn)
|
||||
gnLuna = IIF(EMPTY(tnLuna), 8, tnLuna)
|
||||
gnIdUtil = -3
|
||||
gnIdFirma = 110
|
||||
gcCondSucursala = []
|
||||
@@ -78,7 +79,7 @@ lcPath = gcAppPath + 'Date;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\NFJSON;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\NFXML;' + ;
|
||||
ADDBS(SUBSTR(gcAppPath,1,RAT([\],gcAppPath,2)))+[COMUNROA\]
|
||||
SET PATH TO &lcPath ADDITIVE
|
||||
SET PATH TO (lcPath) ADDITIVE
|
||||
|
||||
Set Classlib To (gcAppPath + "comun\clase\appwiz") Additive
|
||||
Set Classlib To registry Additive
|
||||
@@ -113,7 +114,10 @@ Set Classlib To locale Additive
|
||||
Set Classlib To overificari Additive
|
||||
Set Classlib To ocomenzi Additive
|
||||
Set Classlib To anaf_efactura Additive
|
||||
Set Classlib To _cb_base.vcx Additive
|
||||
|
||||
* mock-ul de amessagebox se incarca primul: sub -A -T un dialog modal atarna rularea fara log
|
||||
Set Procedure To (gcAppPath + "COMUN\utile\Teste\mock_amessagebox.prg") Additive
|
||||
Set Procedure To proceduri_comune Additive
|
||||
Set Procedure To quitapp Additive
|
||||
Set Procedure To init_program Additive
|
||||
@@ -148,6 +152,8 @@ Set Procedure To oexport.prg Additive
|
||||
Set Procedure To validare.prg Additive
|
||||
Set Procedure To ofacturare_comun.prg Additive
|
||||
Set Procedure To ofacturare_stoc.prg Additive
|
||||
Set Procedure To ofacturare_editare.prg Additive
|
||||
Set Procedure To ofacturare_rutare_scriere.prg Additive
|
||||
Set Procedure To pmenu.prg Additive
|
||||
Set Procedure To ointroduceri.prg Additive
|
||||
Set Procedure To ovariabile_globale.prg Additive
|
||||
@@ -166,6 +172,7 @@ Set Procedure To suma_in_vorbe.prg Additive
|
||||
Set Procedure To controllerecr Additive
|
||||
Set Procedure To regex.prg Additive
|
||||
SET PROCEDURE TO anaf_efactura.prg ADDITIVE
|
||||
SET PROCEDURE TO ofacturare_antet.prg ADDITIVE
|
||||
|
||||
Declare Integer GetPrivateProfileString In WIN32API ;
|
||||
string, String, String, String @, Integer, String
|
||||
@@ -211,8 +218,11 @@ goFirma = null
|
||||
llSucces = goExecutor.oExecuta("select * from syn_v_nom_firme where schema = ?gcS", "cFirma")
|
||||
IF m.llSucces
|
||||
SELECT cFirma
|
||||
IF !EMPTY(m.tnIdFirma)
|
||||
LOCATE FOR id_firma = m.tnIdFirma
|
||||
ENDIF
|
||||
gnIdFirma = id_firma
|
||||
gnIdSucursala = null
|
||||
gnIdSucursala = IIF(NVL(id_mama, 0) <> 0, id_firma, NULL)
|
||||
gcFirma = ALLTRIM(firma)
|
||||
SCATTER NAME goFirma
|
||||
IF TYPE('goFirma.codfiscalfro') = 'U'
|
||||
@@ -228,14 +238,10 @@ ENDIF
|
||||
USE IN (SELECT('cFirma'))
|
||||
|
||||
goCalendar = null
|
||||
llSucces = goExecutor.oExecuta('SELECT anul, luna, tva_incasare FROM calendar WHERE an*12+luna = (select MAX(an*12+luna) FROM calendar)', 'cCalendar')
|
||||
llSucces = goExecutor.oExecuta('SELECT anul, luna, tva_incasare FROM calendar WHERE an*12+luna = ' + TRANSFORM(m.gnAn*12+m.gnLuna), 'cCalendar')
|
||||
IF m.llSucces
|
||||
SELECT cCalendar
|
||||
GO TOP
|
||||
IF EMPTY(m.tnAn)
|
||||
gnAn = anul
|
||||
gnLuna = luna
|
||||
ENDIF
|
||||
SCATTER NAME goCalendar
|
||||
ENDIF
|
||||
USE IN (SELECT('cCalendar'))
|
||||
|
||||
Reference in New Issue
Block a user