mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Improve float parsing in csv imports
This commit is contained in:
parent
3a8b1eb7e3
commit
b159a5a08d
@ -178,12 +178,14 @@ class BaseTransformer
|
||||
public function getFloat($data, $field)
|
||||
{
|
||||
if (array_key_exists($field, $data)) {
|
||||
$number = preg_replace('/[^0-9-.]+/', '', $data[$field]);
|
||||
//$number = preg_replace('/[^0-9-.]+/', '', $data[$field]);
|
||||
return Number::parseStringFloat($data[$field]);
|
||||
} else {
|
||||
$number = 0;
|
||||
//$number = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return Number::parseFloat($number);
|
||||
// return Number::parseFloat($number);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -74,6 +74,9 @@ class SendRecurring implements ShouldQueue
|
||||
}
|
||||
|
||||
$invoice->date = date('Y-m-d');
|
||||
|
||||
nlog("Recurring Invoice Date Set on Invoice = {$invoice->date} - ". now()->format('Y-m-d'));
|
||||
|
||||
$invoice->due_date = $this->recurring_invoice->calculateDueDate(date('Y-m-d'));
|
||||
$invoice->recurring_id = $this->recurring_invoice->id;
|
||||
$invoice->saveQuietly();
|
||||
@ -108,9 +111,9 @@ class SendRecurring implements ShouldQueue
|
||||
$this->recurring_invoice->setCompleted();
|
||||
}
|
||||
|
||||
// nlog('next send date = '.$this->recurring_invoice->next_send_date);
|
||||
nlog('next send date = '.$this->recurring_invoice->next_send_date);
|
||||
// nlog('remaining cycles = '.$this->recurring_invoice->remaining_cycles);
|
||||
// nlog('last send date = '.$this->recurring_invoice->last_sent_date);
|
||||
nlog('last send date = '.$this->recurring_invoice->last_sent_date);
|
||||
|
||||
$this->recurring_invoice->save();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user