@@ -11,7 +11,7 @@ namespace PhoneRepairShop
1111 public class RSSVPaymentPlanInq : PXGraph < RSSVPaymentPlanInq >
1212 {
1313 public PXFilter < MasterTable > MasterView ;
14- public PXFilter < DetailsTable > DetailsView = null ! ;
14+ public PXFilter < DetailsTable > DetailsView ;
1515
1616 [ Serializable ]
1717 public class MasterTable : PXBqlTable , IBqlTable
@@ -28,21 +28,19 @@ public class DetailsTable : PXBqlTable, IBqlTable
2828 ////////// The added code
2929 protected virtual void _ ( Events . RowSelecting < RSSVWorkOrderToPay > e )
3030 {
31- using ( new PXConnectionScope ( ) )
32- {
33- if ( e . Row == null ) return ;
34- if ( e . Row . OrderTotal == 0 ) return ;
35- RSSVWorkOrderToPay order = e . Row ;
36- var invoices =
37- SelectFrom < ARInvoice > .
38- Where < ARInvoice . refNbr . IsEqual < @P . AsString > > .
39- View . Select ( this , order . InvoiceNbr ) ;
40- if ( invoices . Count == 0 )
41- return ;
42- ARInvoice first = invoices [ 0 ] ;
43- e . Row . PercentPaid = ( order . OrderTotal - first . CuryDocBal ) /
44- order . OrderTotal * 100 ;
45- }
31+ if ( e . Row == null ) return ;
32+ if ( e . Row . OrderTotal == 0 ) return ;
33+ RSSVWorkOrderToPay order = e . Row ;
34+ // Acuminator disable once PX1042 DatabaseQueriesInRowSelecting [Justification]
35+ var invoices =
36+ SelectFrom < ARInvoice > .
37+ Where < ARInvoice . refNbr . IsEqual < @P . AsString > > .
38+ View . Select ( this , order . InvoiceNbr ) ;
39+ if ( invoices . Count == 0 )
40+ return ;
41+ ARInvoice first = invoices [ 0 ] ;
42+ e . Row . PercentPaid = ( order . OrderTotal - first . CuryDocBal ) /
43+ order . OrderTotal * 100 ;
4644 }
4745 ////////// The end of added code
4846 }
0 commit comments