本文整理汇总了PHP中proveedor::regimenes_iva方法的典型用法代码示例。如果您正苦于以下问题:PHP proveedor::regimenes_iva方法的具体用法?PHP proveedor::regimenes_iva怎么用?PHP proveedor::regimenes_iva使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类proveedor
的用法示例。
在下文中一共展示了proveedor::regimenes_iva方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: regimenes_iva
/**
* Devuelve un array con los regimenes de iva disponibles.
* @return type
*/
public function regimenes_iva()
{
if (!isset(self::$regimenes_iva)) {
/// Si hay usa lista personalizada en fs_vars, la usamos
$fsvar = new fs_var();
$data = $fsvar->simple_get('proveedor::regimenes_iva');
if ($data) {
self::$regimenes_iva = array();
foreach (explode(',', $data) as $d) {
self::$regimenes_iva[] = trim($d);
}
} else {
/// sino usamos estos
self::$regimenes_iva = array('General', 'Exento');
}
/// además de los que haya en la base de datos
$data = $this->db->select("SELECT DISTINCT regimeniva FROM proveedores ORDER BY regimeniva ASC;");
if ($data) {
foreach ($data as $d) {
if (!in_array($d['regimeniva'], self::$regimenes_iva)) {
self::$regimenes_iva[] = $d['regimeniva'];
}
}
}
}
return self::$regimenes_iva;
}
示例2: regimenes_iva
/**
* Devuelve un array con los regimenes de iva disponibles.
* @return type
*/
public function regimenes_iva()
{
if (!isset(self::$regimenes_iva)) {
self::$regimenes_iva = array('General', 'Exento');
$data = $this->db->select("SELECT DISTINCT regimeniva FROM proveedores ORDER BY regimeniva ASC;");
if ($data) {
foreach ($data as $d) {
if (!in_array($d['regimeniva'], self::$regimenes_iva)) {
self::$regimenes_iva[] = $d['regimeniva'];
}
}
}
}
return self::$regimenes_iva;
}