|
|
Сумма по товару
Public Function TotalByRecord(vPrice As Variant, vQuantity As Variant, Optional iRoundTo% = 2) As Currency
Dim cPrice As Currency, cQuantity As Currency
On Error GoTo TotalByRecord_Err
cPrice = Nz(vPrice)
cQuantity = Nz(vQuantity)
TotalByRecord = CCur(Round(cPrice * cQuantity, iRoundTo))
Exit Function
TotalByRecord_Err:
TotalByRecord = 0: Err.Clear
End Function
|
|