Initial: flux text FoxBin2Prg (git urmareste .??2 in-arbore, binarele VFP git-ignored)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
22
Programe/Vechi/calcuzura.prg
Normal file
22
Programe/Vechi/calcuzura.prg
Normal file
@@ -0,0 +1,22 @@
|
||||
PARAMETERS toXmf
|
||||
|
||||
IF TYPE('toXmf') # 'O'
|
||||
RETURN .f.
|
||||
ENDIF
|
||||
|
||||
lnLunaCrt = VAL(M.NL)
|
||||
lnAnCrt = VAL(M.AN)
|
||||
lnUzura = toXmf.uzura
|
||||
IF toXmf.cota # 0 AND toXmf.codop <> 12 && conservare
|
||||
&& toXmf.codop <> 12 conditie necesara pt ca, deocamdata la calculul amortizarii tine cont de uzura si nu doar de cota
|
||||
lnUzPrec = toXmf.uzuraprec
|
||||
lnLunaPif=MONTH(toXmf.DATAPIF)
|
||||
lnAnPif=YEAR(toXmf.DATAPIF)
|
||||
UZ=IIF(lnAnCrt < lnAnPif, 0, 12*(lnAnCrt-lnAnPif)+lnLunaCrt-lnLunaPif) && 12*(an crt - an pif) + luna crt - luna pif
|
||||
|
||||
if UZ=0 and lnUzPrec#0
|
||||
UZ=1
|
||||
ENDIF
|
||||
lnUzura = UZ+lnUzPrec
|
||||
ENDIF
|
||||
RETURN lnUzura
|
||||
Reference in New Issue
Block a user