Corrected invoice items spacing on second page of PDF

This commit is contained in:
Hillel Coren 2015-03-03 14:59:52 +02:00
parent 6e03bc7510
commit 29833e6d83
3 changed files with 8 additions and 2 deletions

View File

@ -40,6 +40,8 @@ class ClientApiController extends Controller
return Response::make($error, 500, $headers);
} else {
$client = $this->clientRepo->save(false, $data, false);
$client->load('contacts');
$client = Utils::remapPublicIds($client->toArray());
$response = json_encode($client, JSON_PRETTY_PRINT);
$headers = Utils::getApiHeaders();

View File

@ -32578,11 +32578,13 @@ function displayInvoiceItems(doc, invoice, layout) {
if (newTop > 770) {
line = 0;
tableTop = layout.accountTop + layout.tablePadding;
y = tableTop;
y = tableTop + (2 * layout.tablePadding);
top = y - layout.tablePadding;
newTop = top + (numLines * layout.tableRowHeight);
doc.addPage();
console.log('== ADD PAGE ==');
}
console.log('Y: %s', y);
var left = layout.marginLeft - layout.tablePadding;
var width = layout.marginRight + layout.tablePadding;
@ -32748,6 +32750,7 @@ function displayInvoiceItems(doc, invoice, layout) {
}
*/
SetPdfColor('Black', doc);
doc.setFontType('normal');

View File

@ -1055,7 +1055,7 @@ function displayInvoiceItems(doc, invoice, layout) {
if (newTop > 770) {
line = 0;
tableTop = layout.accountTop + layout.tablePadding;
y = tableTop;
y = tableTop + (2 * layout.tablePadding);
top = y - layout.tablePadding;
newTop = top + (numLines * layout.tableRowHeight);
doc.addPage();
@ -1225,6 +1225,7 @@ function displayInvoiceItems(doc, invoice, layout) {
}
*/
SetPdfColor('Black', doc);
doc.setFontType('normal');