[Quantproject-developers] QuantProject/b4_Business/a1_Financial/a2_Accounting Portfolio.cs,1.2,1.3
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-12-13 01:52:49
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10019/b4_Business/a1_Financial/a2_Accounting Modified Files: Portfolio.cs Log Message: Bug fixed: now positions are properly removed, when quantity goes to zero. Index: Portfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Portfolio.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Portfolio.cs 29 Nov 2004 16:18:17 -0000 1.2 --- Portfolio.cs 13 Dec 2004 01:52:34 -0000 1.3 *************** *** 97,101 **** this.Add( instrument.Key , new Position( instrument , -quantity ) ) ; if ( this.GetPosition( instrument ).Quantity == 0 ) ! this.Remove( instrument ); } --- 97,101 ---- this.Add( instrument.Key , new Position( instrument , -quantity ) ) ; if ( this.GetPosition( instrument ).Quantity == 0 ) ! this.Remove( instrument.Key ); } *************** *** 115,118 **** --- 115,120 ---- this.remove( transaction.Instrument , transaction.Quantity ); break; + case TransactionType.AddCash: + break; default: errorArised = true; |