- Posts: 7
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
public static function getInvoiceNumber()
{
$db = JFactory::getDbo();
$sql = 'SELECT MAX(invoice_number) FROM #__pf_payments';
$db->setQuery($sql);
$invoiceNumber = (int) $db->loadResult();
if ($invoiceNumber < (int) self::getConfigValue('invoice_start_number'))
{
$invoiceNumber = (int) self::getConfigValue('invoice_start_number') ?: 1;
}
else
{
$invoiceNumber++;
}
return $invoiceNumber;
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.