mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 05:47:34 -05:00 
			
		
		
		
	Change back to UTC dates
This commit is contained in:
		
							parent
							
								
									cc2a64acac
								
							
						
					
					
						commit
						249f5b3543
					
				@ -231,7 +231,7 @@ class InvoiceApiController extends BaseAPIController
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!isset($data['invoice_date'])) {
 | 
					        if (!isset($data['invoice_date'])) {
 | 
				
			||||||
            $fields['invoice_date_sql'] = Utils::today(false)->format('Y-m-d');
 | 
					            $fields['invoice_date_sql'] = date_create()->format('Y-m-d');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (!isset($data['due_date'])) {
 | 
					        if (!isset($data['due_date'])) {
 | 
				
			||||||
            $fields['due_date_sql'] = false;
 | 
					            $fields['due_date_sql'] = false;
 | 
				
			||||||
 | 
				
			|||||||
@ -101,7 +101,7 @@ class InvoiceController extends BaseController
 | 
				
			|||||||
            $invoice->invoice_number = $account->getNextNumber($invoice);
 | 
					            $invoice->invoice_number = $account->getNextNumber($invoice);
 | 
				
			||||||
            $invoice->balance = $invoice->amount;
 | 
					            $invoice->balance = $invoice->amount;
 | 
				
			||||||
            $invoice->invoice_status_id = 0;
 | 
					            $invoice->invoice_status_id = 0;
 | 
				
			||||||
            $invoice->invoice_date = Utils::today(false)->format('Y-m-d');
 | 
					            $invoice->invoice_date = date_create()->format('Y-m-d');
 | 
				
			||||||
            $method = 'POST';
 | 
					            $method = 'POST';
 | 
				
			||||||
            $url = "{$entityType}s";
 | 
					            $url = "{$entityType}s";
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
 | 
				
			|||||||
@ -603,7 +603,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 = Utils::today(false)->format('Y-m-d');
 | 
					        $payment->payment_date = date_create()->format('Y-m-d');
 | 
				
			||||||
        $payment->ip = Request::ip();
 | 
					        $payment->ip = Request::ip();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $payment = $this->creatingPayment($payment, $paymentMethod);
 | 
					        $payment = $this->creatingPayment($payment, $paymentMethod);
 | 
				
			||||||
 | 
				
			|||||||
@ -302,7 +302,7 @@ class InvoiceRepository extends BaseRepository
 | 
				
			|||||||
                $entityType = ENTITY_QUOTE;
 | 
					                $entityType = ENTITY_QUOTE;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            $invoice = $account->createInvoice($entityType, $data['client_id']);
 | 
					            $invoice = $account->createInvoice($entityType, $data['client_id']);
 | 
				
			||||||
            $invoice->invoice_date = Utils::today(false)->format('Y-m-d');
 | 
					            $invoice->invoice_date = date_create()->format('Y-m-d');
 | 
				
			||||||
            if (isset($data['has_tasks']) && filter_var($data['has_tasks'], FILTER_VALIDATE_BOOLEAN)) {
 | 
					            if (isset($data['has_tasks']) && filter_var($data['has_tasks'], FILTER_VALIDATE_BOOLEAN)) {
 | 
				
			||||||
                $invoice->has_tasks = true;
 | 
					                $invoice->has_tasks = true;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@ -670,7 +670,7 @@ class InvoiceRepository extends BaseRepository
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        $clone->invoice_number = $invoiceNumber ?: $account->getNextNumber($clone);
 | 
					        $clone->invoice_number = $invoiceNumber ?: $account->getNextNumber($clone);
 | 
				
			||||||
        $clone->invoice_date = Utils::today(false)->format('Y-m-d');
 | 
					        $clone->invoice_date = date_create()->format('Y-m-d');
 | 
				
			||||||
        $clone->due_date = $account->defaultDueDate($invoice->client);
 | 
					        $clone->due_date = $account->defaultDueDate($invoice->client);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        foreach ([
 | 
					        foreach ([
 | 
				
			||||||
@ -875,7 +875,7 @@ class InvoiceRepository extends BaseRepository
 | 
				
			|||||||
        $invoice->invoice_number = $recurInvoice->account->getNextNumber($invoice);
 | 
					        $invoice->invoice_number = $recurInvoice->account->getNextNumber($invoice);
 | 
				
			||||||
        $invoice->amount = $recurInvoice->amount;
 | 
					        $invoice->amount = $recurInvoice->amount;
 | 
				
			||||||
        $invoice->balance = $recurInvoice->amount;
 | 
					        $invoice->balance = $recurInvoice->amount;
 | 
				
			||||||
        $invoice->invoice_date = Utils::today(false)->format('Y-m-d');
 | 
					        $invoice->invoice_date = date_create()->format('Y-m-d');
 | 
				
			||||||
        $invoice->discount = $recurInvoice->discount;
 | 
					        $invoice->discount = $recurInvoice->discount;
 | 
				
			||||||
        $invoice->po_number = $recurInvoice->po_number;
 | 
					        $invoice->po_number = $recurInvoice->po_number;
 | 
				
			||||||
        $invoice->public_notes = Utils::processVariables($recurInvoice->public_notes);
 | 
					        $invoice->public_notes = Utils::processVariables($recurInvoice->public_notes);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user