本文整理汇总了PHP中FactureFournisseur::initAsSpecimen方法的典型用法代码示例。如果您正苦于以下问题:PHP FactureFournisseur::initAsSpecimen方法的具体用法?PHP FactureFournisseur::initAsSpecimen怎么用?PHP FactureFournisseur::initAsSpecimen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FactureFournisseur
的用法示例。
在下文中一共展示了FactureFournisseur::initAsSpecimen方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testFactureFournisseurCreate
/**
* testFactureFournisseurCreate
*
* @return int
*/
public function testFactureFournisseurCreate()
{
global $conf, $user, $langs, $db;
$conf = $this->savconf;
$user = $this->savuser;
$langs = $this->savlangs;
$db = $this->savdb;
$localobject = new FactureFournisseur($this->savdb);
$localobject->initAsSpecimen();
$result = $localobject->create($user);
$this->assertLessThan($result, 0);
print __METHOD__ . " result=" . $result . "\n";
return $result;
}
示例2: FactureFournisseur
dol_syslog($obj->error, LOG_ERR);
}
}
else
{
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
}
if ($action == 'specimenfacture') // For invoices
{
$modele=$_GET["module"];
$facture = new FactureFournisseur($db);
$facture->initAsSpecimen();
$facture->thirdparty=$specimenthirdparty;
// Charge le modele
$dir = "/includes/modules/supplier_invoice/pdf/";
$file = "pdf_".$modele.".modules.php";
$file = dol_buildpath($dir.$file);
if (file_exists($file))
{
$classname = "pdf_".$modele;
require_once($file);
$obj = new $classname($db,$facture);
if ($obj->write_file($facture,$langs) > 0)
{
示例3: elseif
print '<div class="error">' . $langs->trans($tmp) . '</div>';
} elseif ($tmp == 'NotConfigured') {
print $langs->trans($tmp);
} else {
print $tmp;
}
print '</td>' . "\n";
print '<td align="center">';
if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "{$file}") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setmod&value=' . $file . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
}
print '</td>';
$invoice = new FactureFournisseur($db);
$invoice->initAsSpecimen();
// Info
$htmltooltip = '';
$htmltooltip .= '' . $langs->trans("Version") . ': <b>' . $module->getVersion() . '</b><br>';
$nextval = $module->getNextValue($mysoc, $invoice);
if ("{$nextval}" != $langs->trans("NotAvailable")) {
// Keep " on nextval
$htmltooltip .= '' . $langs->trans("NextValue") . ': ';
if ($nextval) {
if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
$nextval = $langs->trans($nextval);
}
$htmltooltip .= $nextval . '<br>';
} else {
$htmltooltip .= $langs->trans($module->error) . '<br>';
}
示例4: testFactureFournisseurBuild
/**
* testFactureBuild
*
* @return int
*/
public function testFactureFournisseurBuild()
{
global $conf,$user,$langs,$db;
$conf=$this->savconf;
$user=$this->savuser;
$langs=$this->savlangs;
$db=$this->savdb;
$conf->fournisseur->facture->dir_output.='/temp';
$localobject=new FactureFournisseur($this->savdb);
$localobject->initAsSpecimen();
// Canelle
$localobject->modelpdf='canelle';
$result=supplier_invoice_pdf_create($db, $localobject, $localobject->modelpdf, $langs);
$this->assertLessThan($result, 0);
print __METHOD__." result=".$result."\n";
return 0;
}