mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Logic for calculating remaning spaces for colspans
This commit is contained in:
parent
007ec3a85a
commit
7870985aa8
@ -10,7 +10,7 @@
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
namespace App\Services\PdfMaker\Designs\Utilities;
|
||||
namespace App\Services\PdfMaker\Designs\Utilities;
|
||||
|
||||
trait BuildTableHeader
|
||||
{
|
||||
@ -52,4 +52,17 @@ trait BuildTableHeader
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the remaining colspans.
|
||||
*
|
||||
* @param int $taken
|
||||
* @return int
|
||||
*/
|
||||
public function calculateColspan(int $taken): int
|
||||
{
|
||||
$total = (int) count($this->context['product-table-columns']);
|
||||
|
||||
return (int)$total - $taken;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user