mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 16:17:32 -04:00 
			
		
		
		
	Adjustments for payment templates
This commit is contained in:
		
							parent
							
								
									67a73d6cea
								
							
						
					
					
						commit
						ae09df0cfd
					
				| @ -102,7 +102,11 @@ class TemplateEngine | ||||
|         } elseif (stripos($this->template, 'purchase') !== false && $purchase_order = PurchaseOrder::whereHas('invitations')->withTrashed()->company()->first()) { | ||||
|             $this->entity = 'purchase_order'; | ||||
|             $this->entity_obj = $purchase_order; | ||||
|         } elseif ($invoice = Invoice::whereHas('invitations')->withTrashed()->company()->first()) { | ||||
|         }elseif (stripos($this->template, 'payment') !== false && $payment = Payment::withTrashed()->company()->first()) { | ||||
|             $this->entity = 'payment'; | ||||
|             $this->entity_obj = $payment; | ||||
|         }  | ||||
|         elseif ($invoice = Invoice::whereHas('invitations')->withTrashed()->company()->first()) { | ||||
|             $this->entity_obj = $invoice; | ||||
|         } else { | ||||
|             $this->mockEntity(); | ||||
|  | ||||
| @ -116,6 +116,8 @@ trait MakesTemplateData | ||||
|         $data['$quote_total'] = ['value' => '$20.00', 'label' => ctrans('texts.quote_total')]; | ||||
|         $data['$credit_amount'] = ['value' => '$15.00', 'label' => ctrans('texts.credit_amount')]; | ||||
|         $data['$credit_balance'] = ['value' => '$12.00', 'label' => ctrans('texts.credit_balance')]; | ||||
|         $data['$invoice_references'] = ['value' => 'Invoice #2222', 'label' => ctrans('texts.invoices')]; | ||||
|         $data['$invoice_references_subject'] = ['value' => 'Invoice #2222', 'label' => ctrans('texts.invoices')]; | ||||
| 
 | ||||
|         $data['$credit_number'] = &$data['$number']; | ||||
|         $data['$credit_no'] = &$data['$number']; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user