mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 11:08:34 +01:00
prepair numbering models for supplier invoices
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
/* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* 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
|
* 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
|
* 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
|
* \file htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php
|
||||||
* \ingroup facture fournisseur
|
* \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';
|
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.
|
* Create a document onto disk according to template module.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user