mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 00:34:35 -04:00
Add additional import props for vendors
This commit is contained in:
parent
9089d548b5
commit
da27d5bdb4
@ -63,14 +63,17 @@ class ProfitAndLossController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function __invoke(ProfitLossRequest $request)
|
public function __invoke(ProfitLossRequest $request)
|
||||||
{
|
{
|
||||||
|
/** @var \App\Models\User $user */
|
||||||
|
$user = auth()->user();
|
||||||
|
|
||||||
if ($request->has('send_email') && $request->get('send_email')) {
|
if ($request->has('send_email') && $request->get('send_email')) {
|
||||||
SendToAdmin::dispatch(auth()->user()->company(), $request->all(), ProfitLoss::class, $this->filename);
|
SendToAdmin::dispatch($user->company(), $request->all(), ProfitLoss::class, $this->filename);
|
||||||
|
|
||||||
return response()->json(['message' => 'working...'], 200);
|
return response()->json(['message' => 'working...'], 200);
|
||||||
}
|
}
|
||||||
// expect a list of visible fields, or use the default
|
// expect a list of visible fields, or use the default
|
||||||
|
|
||||||
$pnl = new ProfitLoss(auth()->user()->company(), $request->all());
|
$pnl = new ProfitLoss($user->company(), $request->all());
|
||||||
$csv = $pnl->run();
|
$csv = $pnl->run();
|
||||||
|
|
||||||
$headers = [
|
$headers = [
|
||||||
|
@ -33,14 +33,18 @@ class VendorMap
|
|||||||
14 => 'vendor.state',
|
14 => 'vendor.state',
|
||||||
15 => 'vendor.postal_code',
|
15 => 'vendor.postal_code',
|
||||||
16 => 'vendor.country_id',
|
16 => 'vendor.country_id',
|
||||||
17 => 'contact.first_name',
|
17 => 'vendor.custom_value1',
|
||||||
18 => 'contact.last_name',
|
18 => 'vendor.custom_value2',
|
||||||
19 => 'contact.email',
|
19 => 'vendor.custom_value3',
|
||||||
20 => 'contact.phone',
|
20 => 'vendor.custom_value4',
|
||||||
21 => 'contact.custom_value1',
|
21 => 'contact.first_name',
|
||||||
22 => 'contact.custom_value2',
|
22 => 'contact.last_name',
|
||||||
23 => 'contact.custom_value3',
|
23 => 'contact.email',
|
||||||
24 => 'contact.custom_value4',
|
24 => 'contact.phone',
|
||||||
|
25 => 'contact.custom_value1',
|
||||||
|
26 => 'contact.custom_value2',
|
||||||
|
27 => 'contact.custom_value3',
|
||||||
|
28 => 'contact.custom_value4',
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -65,14 +69,18 @@ class VendorMap
|
|||||||
14 => 'texts.state',
|
14 => 'texts.state',
|
||||||
15 => 'texts.postal_code',
|
15 => 'texts.postal_code',
|
||||||
16 => 'texts.country',
|
16 => 'texts.country',
|
||||||
17 => 'texts.first_name',
|
17 => 'texts.custom_value',
|
||||||
18 => 'texts.last_name',
|
18 => 'texts.custom_value',
|
||||||
19 => 'texts.email',
|
19 => 'texts.custom_value',
|
||||||
20 => 'texts.phone',
|
20 => 'texts.custom_value',
|
||||||
21 => 'texts.custom_value',
|
21 => 'texts.first_name',
|
||||||
22 => 'texts.custom_value',
|
22 => 'texts.last_name',
|
||||||
23 => 'texts.custom_value',
|
23 => 'texts.email',
|
||||||
24 => 'texts.custom_value',
|
24 => 'texts.phone',
|
||||||
|
25 => 'texts.custom_value',
|
||||||
|
26 => 'texts.custom_value',
|
||||||
|
27 => 'texts.custom_value',
|
||||||
|
28 => 'texts.custom_value',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ class ProfitLoss
|
|||||||
if ($this->is_income_billed) { //get invoiced amounts
|
if ($this->is_income_billed) { //get invoiced amounts
|
||||||
$this->filterIncome();
|
$this->filterIncome();
|
||||||
} else {
|
} else {
|
||||||
//$this->filterPaymentIncome();
|
|
||||||
$this->filterInvoicePaymentIncome();
|
$this->filterInvoicePaymentIncome();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user