sync SVN r18107
This commit is contained in:
@@ -18687,14 +18687,14 @@ DEFINE CLASS frm_facturare_articole2 AS _frmbase OF "_frm_base.vcx"
|
||||
*!* marius.mutu
|
||||
*!* daca cantitatea ramasa dupa adaugarea articolului gestionabil este < 0, atunci pun 0 ca sa pot intra pe ramura facturare fara stoc
|
||||
|
||||
Lparameters tlImplicit, tlContract, tlRetur
|
||||
Lparameters tlImplicit, tlContract, tlRetur, tlDoarAvertisment
|
||||
* llImplicit = .T. => daca exista o singura linie in stoc, atunci nu mai apare formularul de completare a datelor
|
||||
* tlContract = .T. => provine din gridul cu articole din contract
|
||||
* tlRetur = .T. => se face retur la articolul selectat (trebuie selectat din rulaj in loc de stoc)
|
||||
|
||||
Private pnProcentDiscountMem
|
||||
Local ofrmadarticol As "frm_articol_factura"
|
||||
Local lcSelectActualizare, lcSql, llActualizat, llSucces, lnListaIdOld, lnRecno, lnSucces
|
||||
Local lcMesajContVenit, lcSelectActualizare, lcSql, llActualizat, llSucces, lnListaIdOld, lnRecno, lnSucces
|
||||
Local lnTotalCantitate, loCauta
|
||||
*:Global gnButon, poArtLista
|
||||
pnProcentDiscountMem = 0
|
||||
@@ -18734,6 +18734,17 @@ DEFINE CLASS frm_facturare_articole2 AS _frmbase OF "_frm_base.vcx"
|
||||
gnButon = 2
|
||||
|
||||
If Thisform.do_verifica_articol(poArticol, tlContract, lnCantitate)
|
||||
lcMesajContVenit = verifica_cont_venit_linie(poArticol.id_articol, poArticol.Id_Pol)
|
||||
If !Empty(lcMesajContVenit)
|
||||
If Type('pcAcumulatorContVenit') = 'C'
|
||||
pcAcumulatorContVenit = pcAcumulatorContVenit + Chr(13) + lcMesajContVenit
|
||||
Else
|
||||
AMESSAGEBOX(lcMesajContVenit, 0+48, "Atentie")
|
||||
Endif
|
||||
If !tlDoarAvertisment
|
||||
Return
|
||||
Endif
|
||||
Endif
|
||||
Do Case
|
||||
Case (poArticol.gestionabil = 0 Or gnScadereStoc = 0 Or poDate.tip = 45) && 45 = ROARESTAURANT
|
||||
* initializez frm_articol_factura, sa se initializeze toate calculele si daca nu arat formularul (adaugare toate articolele)
|
||||
@@ -18953,6 +18964,16 @@ DEFINE CLASS frm_facturare_articole2 AS _frmbase OF "_frm_base.vcx"
|
||||
Endif
|
||||
Endif
|
||||
|
||||
Local lcMesajContVenit, lnIdPolLinie
|
||||
lnIdPolLinie = Iif(Type('toArticol.Id_Pol')='N', toArticol.Id_Pol, Nvl(gnId_pol_pret_stoc,0))
|
||||
If Type('toArticol.Id_Pol') <> 'N'
|
||||
AddProperty(toArticol, 'Id_Pol', lnIdPolLinie)
|
||||
Endif
|
||||
lcMesajContVenit = verifica_cont_venit_linie(toArticol.id_articol, lnIdPolLinie)
|
||||
If !Empty(lcMesajContVenit)
|
||||
AMESSAGEBOX(lcMesajContVenit, 0+48, "Atentie")
|
||||
Return .F.
|
||||
Endif
|
||||
If Inlist(poDate.tip, 3, 4, 21, 25, 28, 42, 47) And !Thisform.do_verifica_articol(toArticol, .F., tnCantitate)
|
||||
save_grid_tag(Thisform.grd_factura)
|
||||
Select crsfactura
|
||||
@@ -19097,6 +19118,8 @@ DEFINE CLASS frm_facturare_articole2 AS _frmbase OF "_frm_base.vcx"
|
||||
PROCEDURE do_adauga_tot
|
||||
If Used('crsarticole') And Reccount('crsarticole')>0
|
||||
Local lnNrInregistrare,lnRaspuns,lcArticol,llGestionabil
|
||||
Private pcAcumulatorContVenit
|
||||
pcAcumulatorContVenit = []
|
||||
Select crsarticole
|
||||
Scan
|
||||
lnNrInregistrare = Recno()
|
||||
@@ -19105,7 +19128,7 @@ DEFINE CLASS frm_facturare_articole2 AS _frmbase OF "_frm_base.vcx"
|
||||
llGestionabil = (Type('crsArticole.gestionabil') = 'N' And Nvl(crsarticole.gestionabil, 0) = 1)
|
||||
Do While lnRaspuns = 7
|
||||
If (cantitate > 0 And m.llGestionabil) Or (!m.llGestionabil) && adaug si articolele cu cantitate negativa (ex: articolul de discount)
|
||||
Thisform.do_adauga_articol(.T.)
|
||||
Thisform.do_adauga_articol(.T., .F., .F., .T.)
|
||||
Endif
|
||||
Select crsarticole
|
||||
Go lnNrInregistrare
|
||||
@@ -19118,6 +19141,9 @@ DEFINE CLASS frm_facturare_articole2 AS _frmbase OF "_frm_base.vcx"
|
||||
Select crsarticole
|
||||
Go lnNrInregistrare
|
||||
Endscan
|
||||
If !Empty(pcAcumulatorContVenit)
|
||||
AMESSAGEBOX("Articole fara cont de venit configurat:" + pcAcumulatorContVenit, 0+48, "Atentie")
|
||||
Endif
|
||||
Local lcJtvaLipsa, lnRecFactura, lnSelFactura
|
||||
lcJtvaLipsa = []
|
||||
lnSelFactura = Select()
|
||||
@@ -22607,6 +22633,8 @@ DEFINE CLASS frm_optiuni_facturare AS _frmbase OF "_frm_base.vcx"
|
||||
*< OBJECTDATA: ObjPath="pgfrm_optiuni.Page1.Op_coeficient_k" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="pgfrm_optiuni.Page1.op_aviz_bon_fiscal" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="pgfrm_optiuni.Page1.op_factura_email" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="pgfrm_optiuni.Page1.Clb_nota_stoc_debit" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="pgfrm_optiuni.Page1.Clb_nota_stoc_credit" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="pgfrm_optiuni.Page2.Ed_txt_subsol_fact" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="pgfrm_optiuni.Page2.Ct_clb_fdoc_factura" UniqueID="" Timestamp="" />
|
||||
*< OBJECTDATA: ObjPath="pgfrm_optiuni.Page2.op_printdenumire" UniqueID="" Timestamp="" />
|
||||
@@ -22664,6 +22692,8 @@ DEFINE CLASS frm_optiuni_facturare AS _frmbase OF "_frm_base.vcx"
|
||||
*p: cpolpretk
|
||||
*p: cpolpretstoc
|
||||
*p: cpolprettr
|
||||
*p: csccnotastoc
|
||||
*p: cscdnotastoc
|
||||
*p: natasamentefact
|
||||
*p: nidfdocaviz
|
||||
*p: nidfdocavizretur
|
||||
@@ -22697,6 +22727,8 @@ DEFINE CLASS frm_optiuni_facturare AS _frmbase OF "_frm_base.vcx"
|
||||
cpolpretk =
|
||||
cpolpretstoc =
|
||||
cpolprettr =
|
||||
csccnotastoc =
|
||||
cscdnotastoc =
|
||||
DoCreate = .T.
|
||||
FontCharSet = 238
|
||||
Height = 586
|
||||
@@ -22815,6 +22847,38 @@ DEFINE CLASS frm_optiuni_facturare AS _frmbase OF "_frm_base.vcx"
|
||||
Lb_simplu1.Name = "Lb_simplu1"
|
||||
*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />
|
||||
|
||||
ADD OBJECT 'pgfrm_optiuni.Page1.Clb_nota_stoc_credit' AS clb_tx_simplu WITH ;
|
||||
Height = 29, ;
|
||||
Left = 9, ;
|
||||
Name = "Clb_nota_stoc_credit", ;
|
||||
TabIndex = 16, ;
|
||||
Top = 469, ;
|
||||
Width = 510, ;
|
||||
Text_simplu1.Height = 23, ;
|
||||
Text_simplu1.Left = 254, ;
|
||||
Text_simplu1.Name = "Text_simplu1", ;
|
||||
Text_simplu1.Top = 3, ;
|
||||
Text_simplu1.Width = 90, ;
|
||||
Lb_simplu1.Caption = "Nota implicita stoc - cont creditor", ;
|
||||
Lb_simplu1.Name = "Lb_simplu1"
|
||||
*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />
|
||||
|
||||
ADD OBJECT 'pgfrm_optiuni.Page1.Clb_nota_stoc_debit' AS clb_tx_simplu WITH ;
|
||||
Height = 29, ;
|
||||
Left = 9, ;
|
||||
Name = "Clb_nota_stoc_debit", ;
|
||||
TabIndex = 15, ;
|
||||
Top = 440, ;
|
||||
Width = 510, ;
|
||||
Text_simplu1.Height = 23, ;
|
||||
Text_simplu1.Left = 254, ;
|
||||
Text_simplu1.Name = "Text_simplu1", ;
|
||||
Text_simplu1.Top = 3, ;
|
||||
Text_simplu1.Width = 90, ;
|
||||
Lb_simplu1.Caption = "Nota implicita stoc - cont debitor", ;
|
||||
Lb_simplu1.Name = "Lb_simplu1"
|
||||
*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />
|
||||
|
||||
ADD OBJECT 'pgfrm_optiuni.Page1.Clb_zile_scadenta' AS clb_tx_simplu WITH ;
|
||||
Height = 29, ;
|
||||
Left = 9, ;
|
||||
@@ -24113,6 +24177,7 @@ DEFINE CLASS frm_optiuni_facturare AS _frmbase OF "_frm_base.vcx"
|
||||
Local lcTextConformFact5, lcTextConformFact6, lcTextFooterFact1, lcTextFooterFact2
|
||||
Local lcTextFooterFact3, lcTextFooterFact4, lcTextFooterFact5, lnPrintDenumire, lnTextConformitate, lnId_fdoc_card
|
||||
Local lcTextConformFact7, lcTextConformFact8, lnFacturaSold
|
||||
Local lcScdNotaStoc, lcSccNotaStoc
|
||||
*:Global gcTextConformFact7, gcTextConformFact8, gnFacturaSold, gnId_fdoc_card
|
||||
*:Global gcTextConformFact1, gcTextConformFact2, gcTextConformFact3, gcTextConformFact4
|
||||
*:Global gcTextConformFact5, gcTextConformFact6, gcTextFooterFact1, gcTextFooterFact2
|
||||
@@ -24172,6 +24237,8 @@ DEFINE CLASS frm_optiuni_facturare AS _frmbase OF "_frm_base.vcx"
|
||||
lnId_part_casa = Thisform.nidpartcasa
|
||||
lnId_pol_pret_tr = Thisform.nidpolprettr
|
||||
lnId_pol_pret_stoc = Thisform.nidpolpretstoc
|
||||
lcScdNotaStoc = Alltrim(.page1.clb_nota_stoc_debit.text_simplu1.Value)
|
||||
lcSccNotaStoc = Alltrim(.page1.clb_nota_stoc_credit.text_simplu1.Value)
|
||||
*!* modificare v 2.0.58
|
||||
lnAtasamenteFact = .page1.op_salvare_pdf._optiongrup1.Value
|
||||
*!* modificare v 2.0.58 ^
|
||||
@@ -24451,6 +24518,18 @@ DEFINE CLASS frm_optiuni_facturare AS _frmbase OF "_frm_base.vcx"
|
||||
Endif
|
||||
*!* modificare v 2.0.93 ^
|
||||
|
||||
If lcScdNotaStoc <> This.cScdNotaStoc Or lcSccNotaStoc <> This.cSccNotaStoc
|
||||
Local loNotaStoc
|
||||
loNotaStoc = Createobject('cus_pret_nomenclator')
|
||||
If !loNotaStoc.salveaza_nota_politica(lnId_pol_pret_stoc, lcScdNotaStoc, lcSccNotaStoc)
|
||||
Release loNotaStoc
|
||||
Return .F.
|
||||
Endif
|
||||
Release loNotaStoc
|
||||
This.cScdNotaStoc = lcScdNotaStoc
|
||||
This.cSccNotaStoc = lcSccNotaStoc
|
||||
Endif
|
||||
|
||||
Set Exact &lcSetare
|
||||
|
||||
If !Empty(lcOptiuni) And !Empty(lcValori)
|
||||
@@ -24571,6 +24650,21 @@ DEFINE CLASS frm_optiuni_facturare AS _frmbase OF "_frm_base.vcx"
|
||||
|
||||
actualizeaza_politica_pret(23,@gnId_pol_pret_tr,@lcPolPretTr)
|
||||
actualizeaza_politica_pret(1,@gnId_pol_pret_stoc,@lcPolPretStoc)
|
||||
If Empty(Nvl(gnId_pol_pret_stoc,0))
|
||||
Local loPolStoc, lnIdPolStoc
|
||||
loPolStoc = Createobject('cus_pret_nomenclator')
|
||||
lnIdPolStoc = loPolStoc.asigura_politica()
|
||||
Release loPolStoc
|
||||
If lnIdPolStoc > 0
|
||||
actualizeaza_politica_pret(1,@gnId_pol_pret_stoc,@lcPolPretStoc)
|
||||
Endif
|
||||
Endif
|
||||
Local loNotaStoc
|
||||
loNotaStoc = Createobject('cus_pret_nomenclator')
|
||||
loNotaStoc.incarca_nota_politica(Nvl(gnId_pol_pret_stoc,0))
|
||||
This.cScdNotaStoc = loNotaStoc.cScd
|
||||
This.cSccNotaStoc = loNotaStoc.cScc
|
||||
Release loNotaStoc
|
||||
*!* modificare v 2.0.58
|
||||
Thisform.natasamentefact = 2-Nvl(citeste_optiune_firma([ATASAMENTEFACT]),0)
|
||||
*!* modificare v 2.0.58 ^
|
||||
@@ -24647,6 +24741,9 @@ DEFINE CLASS frm_optiuni_facturare AS _frmbase OF "_frm_base.vcx"
|
||||
.op_factura_email._optiongrup1.Value = IIF(Nvl(m.gnFacturaEmail,0) = 0, 2, IIF(Nvl(m.gnFacturaEmail,0) = 1, 1, 3))
|
||||
|
||||
.ct_clb_pol_pret_stoc.clb_tx_cautare.teXT_SIMPLU1.Refresh()
|
||||
.ct_clb_pol_pret_stoc.Enabled = Empty(Thisform.nidpolpretstoc)
|
||||
.clb_nota_stoc_debit.text_simplu1.Value = This.cScdNotaStoc
|
||||
.clb_nota_stoc_credit.text_simplu1.Value = This.cSccNotaStoc
|
||||
*!* modificare v 2.0.58
|
||||
.op_salvare_pdf._optiongrup1.Value = Thisform.natasamentefact
|
||||
.op_salvare_pdf.Refresh()
|
||||
|
||||
Reference in New Issue
Block a user