mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
prepair numbering models for supplier invoices
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -20,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php
|
||||
* \ingroup facture fournisseur
|
||||
* \brief File that contain parent class for supplier invoices models
|
||||
* \brief File that contains parent class for supplier invoices models
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
|
||||
@@ -55,6 +56,79 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Parent Class of numbering models of suppliers invoices references
|
||||
*/
|
||||
abstract class ModeleNumRefSuppliersInvoices
|
||||
{
|
||||
var $error='';
|
||||
|
||||
/** Return if a model can be used or not
|
||||
*
|
||||
* @return boolean true if model can be used
|
||||
*/
|
||||
function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Returns the default description of the model numbering
|
||||
*
|
||||
* @return string Description Text
|
||||
*/
|
||||
function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("invoices");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/** Returns a numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("invoices");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/** Tests if the numbers already in force in the database do not cause conflicts that would prevent this numbering.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Returns next value assigned
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getNextValue()
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/** Returns version of the model numbering
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
|
||||
if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
|
||||
if ($this->version == 'dolibarr') return DOL_VERSION;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a document onto disk according to template module.
|
||||
*
|
||||
@@ -168,4 +242,4 @@ function supplier_invoice_pdf_create($db, $object, $modele, $outputlangs, $hided
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user