mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 04:27:33 -05:00 
			
		
		
		
	Refactor for payment processing
This commit is contained in:
		
							parent
							
								
									97accc8142
								
							
						
					
					
						commit
						6974841921
					
				@ -279,7 +279,6 @@ class AutoBillInvoice extends AbstractService
 | 
				
			|||||||
            $this->is_partial_amount = true;
 | 
					            $this->is_partial_amount = true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        $payment_repo = new PaymentRepository(new CreditRepository());
 | 
					        $payment_repo = new PaymentRepository(new CreditRepository());
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        foreach ($unapplied_payments as $key => $payment) {
 | 
					        foreach ($unapplied_payments as $key => $payment) {
 | 
				
			||||||
@ -312,6 +311,10 @@ class AutoBillInvoice extends AbstractService
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $this->invoice = $this->invoice->fresh();
 | 
					            $this->invoice = $this->invoice->fresh();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if((int)$this->invoice->balance == 0) {
 | 
				
			||||||
 | 
					                return $this;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $this;
 | 
					        return $this;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user