Current Module
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Module allow edit existing orders and set rules for automatically generating numbers for orders and other documents
|
||||
*
|
||||
* @author Keshva <keshvathakur47@gmail.com>
|
||||
* @copyright 2021 Keshva
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once(_PS_MODULE_DIR_.'modrefchange/classes/DocumentReferences.php');
|
||||
|
||||
class OrderInvoice extends OrderInvoiceCore
|
||||
{
|
||||
public function getInvoiceNumberFormatted($id_lang, $id_shop = null, $oldFormat = false)
|
||||
{
|
||||
$invoiceNumber = DocumentReferences::getReference($this->id, 'invoice')['reference'];
|
||||
if ($oldFormat || $invoiceNumber == NULL) {
|
||||
return parent::getInvoiceNumberFormatted($id_lang, $id_shop);
|
||||
}
|
||||
return $invoiceNumber;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user