mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
CSV import improvements
This commit is contained in:
parent
a50ca5a328
commit
4c5a5ef941
@ -462,7 +462,7 @@ class ImportService
|
|||||||
|
|
||||||
if ($resource = $paymentTransformer->transform($row)) {
|
if ($resource = $paymentTransformer->transform($row)) {
|
||||||
$data = $this->fractal->createData($resource)->toArray();
|
$data = $this->fractal->createData($resource)->toArray();
|
||||||
$data['amount'] = min($data['amount'], $row->amount);
|
$data['amount'] = min($data['amount'], Utils::parseFloat($row->amount));
|
||||||
if (Payment::validate($data) === true) {
|
if (Payment::validate($data) === true) {
|
||||||
$this->paymentRepo->save($data);
|
$this->paymentRepo->save($data);
|
||||||
}
|
}
|
||||||
@ -824,8 +824,7 @@ class ImportService
|
|||||||
$this->maps['client'][$name] = $client->id;
|
$this->maps['client'][$name] = $client->id;
|
||||||
$this->maps['client_ids'][$client->public_id] = $client->id;
|
$this->maps['client_ids'][$client->public_id] = $client->id;
|
||||||
}
|
}
|
||||||
|
if ($name = strtolower(trim($client->contacts[0]->email))) {
|
||||||
if ($name = strtolower(trim($client->getDisplayName()))) {
|
|
||||||
$this->maps['client'][$name] = $client->id;
|
$this->maps['client'][$name] = $client->id;
|
||||||
$this->maps['client_ids'][$client->public_id] = $client->id;
|
$this->maps['client_ids'][$client->public_id] = $client->id;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user