@@ -15,7 +15,7 @@ public void allocation_to_invoice()
15
15
{
16
16
var creditNote = new CreditNotes . CreditNotesTest ( ) . Given_an_authorised_creditnote ( CreditNoteType . AccountsReceivable ) ;
17
17
var invoice = new Create ( ) . Given_an_authorised_invoice ( InvoiceType . AccountsReceivable ) ;
18
- var expected = Math . Min ( creditNote . Total , invoice . Total . GetValueOrDefault ( ) ) ;
18
+ var expected = Math . Min ( creditNote . Total . GetValueOrDefault ( ) , invoice . Total . GetValueOrDefault ( ) ) ;
19
19
20
20
var result = Api . Allocations . Add ( new Allocation
21
21
{
@@ -34,7 +34,7 @@ public void allocation_to_invoice_minimal()
34
34
{
35
35
var creditNote = new CreditNotes . CreditNotesTest ( ) . Given_an_authorised_creditnote ( ) ;
36
36
var invoice = new Create ( ) . Given_an_authorised_invoice ( ) ;
37
- var expected = Math . Min ( creditNote . Total , invoice . Total . GetValueOrDefault ( ) ) ;
37
+ var expected = Math . Min ( creditNote . Total . GetValueOrDefault ( ) , invoice . Total . GetValueOrDefault ( ) ) ;
38
38
39
39
var result = Api . Allocations . Add ( new Allocation
40
40
{
@@ -54,7 +54,7 @@ public void allocation_on_creditnote()
54
54
{
55
55
var creditNote = new CreditNotes . CreditNotesTest ( ) . Given_an_authorised_creditnote ( ) ;
56
56
var invoice = new Create ( ) . Given_an_authorised_invoice ( ) ;
57
- var expected = Math . Min ( creditNote . Total , invoice . Total . GetValueOrDefault ( ) ) ;
57
+ var expected = Math . Min ( creditNote . Total . GetValueOrDefault ( ) , invoice . Total . GetValueOrDefault ( ) ) ;
58
58
59
59
Api . Allocations . Add ( new Allocation
60
60
{
@@ -114,7 +114,7 @@ public void Credit_notes_show_up_on_invoices()
114
114
{
115
115
var creditNote = new CreditNotes . CreditNotesTest ( ) . Given_an_authorised_creditnote ( ) ;
116
116
var invoice = new Create ( ) . Given_an_authorised_invoice ( ) ;
117
- var amount = Math . Min ( creditNote . Total , invoice . Total . GetValueOrDefault ( ) ) ;
117
+ var amount = Math . Min ( creditNote . Total . GetValueOrDefault ( ) , invoice . Total . GetValueOrDefault ( ) ) ;
118
118
119
119
Api . Allocations . Add ( new Allocation
120
120
{
0 commit comments