Invoice PDF builder

This commit is contained in:
roshelrao
2021-07-14 13:10:39 +05:30
parent 7228bb2922
commit 9a1ee350c3
4 changed files with 16 additions and 7 deletions

View File

@@ -298,6 +298,13 @@ var InvoiceAdapter = /*#__PURE__*/function (_ReactModalAdapterBas) {
sorter: true
}];
}
/* getActionButtonsHtml(id, data) {
let html = '<div style="width:80px;"><img class="tableActionButton" src="_BASE_images/download.png" style="cursor:pointer;" rel="tooltip" title="Download" onclick="modJs.edit(_id_);return false;"></img></div>';
html = html.replace(/_id_/g, id);
html = html.replace(/_BASE_/g, this.baseUrl);
return html;
}*/
}]);
return InvoiceAdapter;
@@ -3099,7 +3106,7 @@ var ModuleBase = /*#__PURE__*/function () {
}
}
}catch(e){
}
}
return null;
}
*/

File diff suppressed because one or more lines are too long

View File

@@ -6,7 +6,8 @@ use Classes\BaseService;
use Classes\FileService;
use Classes\IceResponse;
use Classes\Pdf\PdfBuilder;
use Employees\Common\Model\Employee;
//use Employees\Common\Model\Employee;
use Invoices\Model\Invoice;
use Invoices\Pdf\InvoicePdf;
@@ -41,11 +42,11 @@ class InvoicePDFBuilder implements Authorizable, PdfBuilder
}
$form = $response->getData()['form'];
$employeeForm = $response->getData()['data'];
$invoiceForm = $response->getData()['data'];
$employee = new Employee();
$employee->Load('id = ?', [$employeeForm->employee]);
$employee = FileService::getInstance()->updateSmallProfileImage($employee);
$invoice = new Invoice();
$invoice->Load('id = ?', [$invoiceForm->invoice]);
//$employee = FileService::getInstance()->updateSmallProfileImage($employee);
$pdf = new InvoicePdf($invoice);
$pdf->initialize($form->name);

View File

@@ -171,6 +171,7 @@ class InvoiceAdapter extends ReactModalAdapterBase {
},
];
}
}
module.exports ={InvoiceAdapter};