当前位置: 首页>>代码示例>>PHP>>正文


PHP Societe::fetch_thirdparty方法代码示例

本文整理汇总了PHP中Societe::fetch_thirdparty方法的典型用法代码示例。如果您正苦于以下问题:PHP Societe::fetch_thirdparty方法的具体用法?PHP Societe::fetch_thirdparty怎么用?PHP Societe::fetch_thirdparty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Societe的用法示例。


在下文中一共展示了Societe::fetch_thirdparty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 /**
  *	Constructor
  *
  *  @param	DoliDB		$db     	Database handler
  *  @param	Societe		$object		Supplier invoice
  */
 function __construct($db, $object)
 {
     global $conf, $langs, $mysoc;
     $langs->load("main");
     $langs->load("bills");
     $this->db = $db;
     $this->name = "canelle";
     $this->description = $langs->trans('SuppliersInvoiceModel');
     // Dimension page pour format A4
     $this->type = 'pdf';
     $formatarray = pdf_getFormat();
     $this->page_largeur = $formatarray['width'];
     $this->page_hauteur = $formatarray['height'];
     $this->format = array($this->page_largeur, $this->page_hauteur);
     $this->marge_gauche = 10;
     $this->marge_droite = 10;
     $this->marge_haute = 10;
     $this->marge_basse = 10;
     $this->option_logo = 1;
     // Affiche logo
     $this->option_tva = 1;
     // Gere option tva FACTURE_TVAOPTION
     $this->option_modereg = 1;
     // Affiche mode reglement
     $this->option_condreg = 1;
     // Affiche conditions reglement
     $this->option_codeproduitservice = 1;
     // Affiche code produit-service
     $this->option_multilang = 1;
     // Dispo en plusieurs langues
     $this->franchise = !$mysoc->tva_assuj;
     // Get source company
     if (!is_object($object->thirdparty)) {
         $object->fetch_thirdparty();
     }
     $this->emetteur = $object->thirdparty;
     if (!$this->emetteur->country_code) {
         $this->emetteur->country_code = substr($langs->defaultlang, -2);
     }
     // By default, if was not defined
     // Defini position des colonnes
     $this->posxdesc = $this->marge_gauche + 1;
     $this->posxtva = 111;
     $this->posxup = 126;
     $this->posxqty = 145;
     $this->posxdiscount = 162;
     $this->postotalht = 174;
     $this->tva = array();
     $this->localtax1 = array();
     $this->localtax2 = array();
     $this->atleastoneratenotnull = 0;
     $this->atleastonediscount = 0;
 }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:59,代码来源:pdf_canelle.modules.php

示例2: Societe

		}
	}


	/*
	 * Generate document
	 */
	if ($action == 'builddoc') {  // En get ou en post
		if (is_numeric(GETPOST('model'))) {
			$error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Model"));
		} else {
			require_once(DOL_DOCUMENT_ROOT . '/core/modules/societe/modules_societe.class.php');

			$object = new Societe($db);
			$object->load($socid);
			$object->fetch_thirdparty();

			// Define output language
			$outputlangs = $langs;
			$newlang = '';
			if ($conf->global->MAIN_MULTILANGS && empty($newlang) && !empty($_REQUEST['lang_id']))
				$newlang = $_REQUEST['lang_id'];
			if ($conf->global->MAIN_MULTILANGS && empty($newlang))
				$newlang = $fac->client->default_lang;
			if (!empty($newlang)) {
				$outputlangs = new Translate("", $conf);
				$outputlangs->setDefaultLang($newlang);
			}
			$result = thirdparty_doc_create($db, $object->id, '', $_REQUEST['model'], $outputlangs);
			if ($result <= 0) {
				dol_print_error($db, $result);
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:fiche.php


注:本文中的Societe::fetch_thirdparty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。