mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 22:47:32 -05:00 
			
		
		
		
	Use timezone when setting payment date
This commit is contained in:
		
							parent
							
								
									f82eecf2fb
								
							
						
					
					
						commit
						349f7f2621
					
				@ -606,6 +606,7 @@ class BasePaymentDriver
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public function createPayment($ref = false, $paymentMethod = null)
 | 
					    public function createPayment($ref = false, $paymentMethod = null)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        $account = $this->account();
 | 
				
			||||||
        $invitation = $this->invitation;
 | 
					        $invitation = $this->invitation;
 | 
				
			||||||
        $invoice = $this->invoice();
 | 
					        $invoice = $this->invoice();
 | 
				
			||||||
        $invoice->markSentIfUnsent();
 | 
					        $invoice->markSentIfUnsent();
 | 
				
			||||||
@ -618,7 +619,7 @@ class BasePaymentDriver
 | 
				
			|||||||
        $payment->client_id = $invoice->client_id;
 | 
					        $payment->client_id = $invoice->client_id;
 | 
				
			||||||
        $payment->contact_id = $invitation->contact_id;
 | 
					        $payment->contact_id = $invitation->contact_id;
 | 
				
			||||||
        $payment->transaction_reference = $ref;
 | 
					        $payment->transaction_reference = $ref;
 | 
				
			||||||
        $payment->payment_date = date_create()->format('Y-m-d');
 | 
					        $payment->payment_date = $account->getDateTime()->format('Y-m-d');
 | 
				
			||||||
        $payment->ip = Request::ip();
 | 
					        $payment->ip = Request::ip();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $payment = $this->creatingPayment($payment, $paymentMethod);
 | 
					        $payment = $this->creatingPayment($payment, $paymentMethod);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user