mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 05:27:33 -05:00 
			
		
		
		
	Fixes for sending payment email on Mark Paid
This commit is contained in:
		
							parent
							
								
									c52a3dd871
								
							
						
					
					
						commit
						cb620f09ed
					
				@ -91,16 +91,16 @@ class MarkPaid extends AbstractService
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $payment->service()->applyNumber()->save();
 | 
					        $payment->service()->applyNumber()->save();
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        if($payment->company->getSetting('send_email_on_mark_paid'))
 | 
					 | 
				
			||||||
            $payment->service()->sendEmail();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        $this->setExchangeRate($payment);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        /* Create a payment relationship to the invoice entity */
 | 
					        /* Create a payment relationship to the invoice entity */
 | 
				
			||||||
        $payment->invoices()->attach($this->invoice->id, [
 | 
					        $payment->invoices()->attach($this->invoice->id, [
 | 
				
			||||||
            'amount' => $this->payable_balance,
 | 
					            'amount' => $this->payable_balance,
 | 
				
			||||||
        ]);
 | 
					        ]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if($payment->company->getSetting('send_email_on_mark_paid'))
 | 
				
			||||||
 | 
					            $payment->service()->sendEmail();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        $this->setExchangeRate($payment);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        event('eloquent.created: App\Models\Payment', $payment);
 | 
					        event('eloquent.created: App\Models\Payment', $payment);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $this->invoice->next_send_date = null;
 | 
					        $this->invoice->next_send_date = null;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user