mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 21:44:51 +00:00
Invoice time support (#269)
* Changed invoice date to datetime * Fixed code style errors * Update TimeFormatsController.php * Update TimeFormatter.php * Update TimeFormatsController namespace * Fix missing comma in language file * Fix formatting --------- Co-authored-by: troky <troky2001@yahoo.com>
This commit is contained in:
committed by
GitHub
parent
32e03b98a3
commit
f52b73f517
@@ -46,6 +46,16 @@ class CloneInvoiceController extends Controller
|
||||
|
||||
$exchange_rate = $invoice->exchange_rate;
|
||||
|
||||
$dateFormat = 'Y-m-d';
|
||||
$invoiceTimeEnabled = CompanySetting::getSetting(
|
||||
'invoice_use_time',
|
||||
$request->header('company')
|
||||
);
|
||||
|
||||
if ($invoiceTimeEnabled === 'YES') {
|
||||
$dateFormat .= ' H:i';
|
||||
}
|
||||
|
||||
$newInvoice = Invoice::create([
|
||||
'invoice_date' => $date->format('Y-m-d'),
|
||||
'due_date' => $due_date,
|
||||
|
||||
Reference in New Issue
Block a user