@ -18,7 +18,8 @@ namespace Gremlin.MVVM
private string _quoteNumber ;
private int _warranty = 12 ;
private int _validity = 60 ;
private float _vAT = 19f ;
private decimal _vAT = 19 ;
private decimal _freight = 1 ;
private bool? _showBrutto = true ;
private bool? _singlePrices = true ;
private bool? _attachBrochures ;
@ -39,9 +40,10 @@ namespace Gremlin.MVVM
public bool? AttachDataSheets { get = > _attachDataSheets ; set { _attachDataSheets = value ; NotifyOfPropertyChange ( ( ) = > AttachDataSheets ) ; } }
public bool? UseMailTemplate { get = > _useMailTemplate ; set { _useMailTemplate = value ; NotifyOfPropertyChange ( ( ) = > UseMailTemplate ) ; } }
public bool? ShowDiscounts { get = > _showDiscounts ; set { _showDiscounts = value ; NotifyOfPropertyChange ( ( ) = > ShowDiscounts ) ; } }
public float VAT { get = > _vAT ; set { _vAT = value ; NotifyOfPropertyChange ( ( ) = > VAT ) ; } }
public decimal VAT { get = > _vAT ; set { _vAT = value ; NotifyOfPropertyChange ( ( ) = > VAT ) ; } }
public int OppID { get = > _oppID ; set { _oppID = value ; NotifyOfPropertyChange ( ( ) = > OppID ) ; } }
public bool Preisinformation { get = > _preisinformation ; set { _preisinformation = value ; NotifyOfPropertyChange ( ( ) = > Preisinformation ) ; } }
public decimal Freight { get = > _freight ; set { _freight = value ; NotifyOfPropertyChange ( ( ) = > Freight ) ; } }
public ObservableCollection < LineItemViewModel > LineItemsViewModel { get = > _lineItemsVM ; set { _lineItemsVM = value ; NotifyOfPropertyChange ( ( ) = > LineItemsViewModel ) ; } }
public ContactViewModel Recipient { get = > _recipient ; set { _recipient = value ; NotifyOfPropertyChange ( ( ) = > Recipient ) ; } }
@ -50,6 +52,10 @@ namespace Gremlin.MVVM
public decimal TotalListprice = > GetTotal ( "TotalListprice" ) ;
public decimal AverageDiscount = > GetTotal ( "AverageDiscount" ) ;
public decimal TotalNet = > GetTotal ( "TotalNet" ) ;
public decimal TotalFreightOnly = > TotalNet * Freight / 100 ;
public decimal TotalFreight = > TotalNet * ( 1 + VAT ) / 100 ;
public decimal TotalVAT = > TotalFreight * VAT / 100 ;
public decimal TotalGross = > TotalNet * ( 1 + VAT ) / 100 ;
public bool QuoteContains3PP = > DoesContains ( "3PP" ) ;
public bool QuoteContainsRB = > DoesContains ( "RB" ) ;
@ -78,7 +84,7 @@ namespace Gremlin.MVVM
OppID = random . Next ( 111111111 , 999999999 ) ;
}
private QuoteViewModel ( string quoteNumber , string quoteType , ContactViewModel recipient , ContactViewModel salesRep , bool? brutto , float vAT , int warranty , int validity , string quotePath , bool? singlePrices , bool? brochures , bool? dataSheets , bool? mailTemplate , bool? showDiscounts )
private QuoteViewModel ( string quoteNumber , string quoteType , ContactViewModel recipient , ContactViewModel salesRep , bool? brutto , decimal vAT , int warranty , int validity , string quotePath , bool? singlePrices , bool? brochures , bool? dataSheets , bool? mailTemplate , bool? showDiscounts )
{
QuoteNumber = quoteNumber ;
QuoteType = quoteType ;
@ -96,7 +102,7 @@ namespace Gremlin.MVVM
ShowDiscounts = showDiscounts ;
}
internal static QuoteViewModel CreateQuote ( string quoteNumber , ContactViewModel recipient , ContactViewModel salesRep , float vAT = 19f , string quoteType = "ein Analysegerät" , bool? brutto = true , int warranty = 12 , bool? singlePrices = true , bool? brochures = true , bool? dataSheets = true , bool? mailTemplate = true , string quotePath = "" , int validity = 60 , bool? showDiscounts = true )
internal static QuoteViewModel CreateQuote ( string quoteNumber , ContactViewModel recipient , ContactViewModel salesRep , decimal vAT = 19 , string quoteType = "ein Analysegerät" , bool? brutto = true , int warranty = 12 , bool? singlePrices = true , bool? brochures = true , bool? dataSheets = true , bool? mailTemplate = true , string quotePath = "" , int validity = 60 , bool? showDiscounts = true )
{
QuoteViewModel quoteVM = new ( quoteNumber , quoteType , recipient , salesRep , brutto , vAT , warranty , validity , quotePath , singlePrices , brochures , dataSheets , mailTemplate , showDiscounts ) ;
quoteVM . LineItemsViewModel = new ( ) ;