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


PHP DiscountAbsolute::getNomUrl方法代码示例

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


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

示例1: DiscountAbsolute

         $formconfirm = $hookmanager->resPrint;
     }
 }
 // Print form confirm
 print $formconfirm;
 // Invoice content
 print '<table class="border" width="100%">';
 $linkback = '<a href="' . DOL_URL_ROOT . '/compta/facture/list.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
 // Ref
 print '<tr><td width="20%">' . $langs->trans('Ref') . '</td>';
 print '<td colspan="5">';
 $morehtmlref = '';
 $discount = new DiscountAbsolute($db);
 $result = $discount->fetch(0, $object->id);
 if ($result > 0) {
     $morehtmlref = ' (' . $langs->trans("CreditNoteConvertedIntoDiscount", $discount->getNomUrl(1, 'discount')) . ')';
 }
 if ($result < 0) {
     dol_print_error('', $discount->error);
 }
 print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref);
 print '</td></tr>';
 // Ref customer
 print '<tr><td width="20%">';
 print '<table class="nobordernopadding" width="100%"><tr><td>';
 print $langs->trans('RefCustomer');
 print '</td>';
 if ($action != 'refclient' && !empty($object->brouillon)) {
     print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=refclient&amp;id=' . $object->id . '">' . img_edit($langs->trans('Modify')) . '</a></td>';
 }
 print '</tr></table>';
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:facture.php

示例2: DiscountAbsolute

				else
				{
					print '<td>';
					print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
					if (($objp->info_bits & 2) == 2)
					{
						print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->socid.'">';
						print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount");
						print '</a>';
						if ($objp->description)
						{
							if ($objp->description == '(CREDIT_NOTE)')
							{
								$discount=new DiscountAbsolute($db);
								$discount->fetch($objp->fk_remise_except);
								print ' - '.$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0));
							}
							else
							{
								print ' - '.nl2br($objp->description);
							}
						}
					}
					else
					{
						if ($type==1) $text = img_object($langs->trans('Service'),'service');
						else $text = img_object($langs->trans('Product'),'product');
						print $text.' '.nl2br($objp->description);

						// Show range
						print_date_range($objp->date_start,$objp->date_end);
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:propal.php

示例3: printOriginLine

 /**
  * 	Return HTML with a line of table array of source object lines
  *  TODO Move this and previous function into output html class file (htmlline.class.php).
  *  If lines are into a template, title must also be into a template
  *  But for the moment we don't know if it's possible as we keep a method available on overloaded objects.
  *
  * 	@param	array	$line		Line
  * 	@param	string	$var		Var
  * 	@return	void
  */
 function printOriginLine($line, $var)
 {
     global $conf, $langs, $bc;
     //var_dump($line);
     $date_start = $line->date_debut_prevue;
     if ($line->date_debut_reel) {
         $date_start = $line->date_debut_reel;
     }
     $date_end = $line->date_fin_prevue;
     if ($line->date_fin_reel) {
         $date_end = $line->date_fin_reel;
     }
     $this->tpl['label'] = '';
     if (!empty($line->fk_parent_line)) {
         $this->tpl['label'] .= img_picto('', 'rightarrow');
     }
     if (($line->info_bits & 2) == 2) {
         $discount = new DiscountAbsolute($this->db);
         $discount->fk_soc = $this->socid;
         $this->tpl['label'] .= $discount->getNomUrl(0, 'discount');
     } else {
         if ($line->fk_product) {
             $productstatic = new Product($this->db);
             $productstatic->id = $line->fk_product;
             $productstatic->ref = $line->ref;
             $productstatic->type = $line->fk_product_type;
             $this->tpl['label'] .= $productstatic->getNomUrl(1);
             $this->tpl['label'] .= $line->label ? ' - ' . $line->label : '';
             // Dates
             if ($line->product_type == 1 && ($date_start || $date_end)) {
                 $this->tpl['label'] .= get_date_range($date_start, $date_end);
             }
         } else {
             $this->tpl['label'] .= $line->product_type == -1 ? '&nbsp;' : ($line->product_type == 1 ? img_object($langs->trans(''), 'service') : img_object($langs->trans(''), 'product'));
             $this->tpl['label'] .= $line->label ? '&nbsp;' . $line->label : '';
             // Dates
             if ($line->product_type == 1 && ($date_start || $date_end)) {
                 $this->tpl['label'] .= get_date_range($date_start, $date_end);
             }
         }
     }
     if ($line->desc) {
         if ($line->desc == '(CREDIT_NOTE)') {
             $discount = new DiscountAbsolute($this->db);
             $discount->fetch($line->fk_remise_except);
             $this->tpl['description'] = $langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0));
         } elseif ($line->desc == '(DEPOSIT)') {
             $discount = new DiscountAbsolute($this->db);
             $discount->fetch($line->fk_remise_except);
             $this->tpl['description'] = $langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0));
         } else {
             $this->tpl['description'] = dol_trunc($line->desc, 60);
         }
     } else {
         $this->tpl['description'] = '&nbsp;';
     }
     $this->tpl['vat_rate'] = vatrate($line->tva_tx, true);
     $this->tpl['price'] = price($line->subprice);
     $this->tpl['qty'] = ($line->info_bits & 2) != 2 ? $line->qty : '&nbsp;';
     $this->tpl['remise_percent'] = ($line->info_bits & 2) != 2 ? vatrate($line->remise_percent, true) : '&nbsp;';
     // Output template part (modules that overwrite templates must declare this into descriptor)
     // Use global variables + $dateSelector + $seller and $buyer
     $dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl'));
     foreach ($dirtpls as $reldir) {
         $res = @(include dol_buildpath($reldir . '/originproductline.tpl.php'));
         if ($res) {
             break;
         }
     }
 }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:80,代码来源:commonobject.class.php

示例4: DiscountAbsolute

        $txt = $langs->trans("Deposit");
    }
    //else $txt=$langs->trans("Discount");
    print $txt;
    ?>
		</a>
		<?php 
    if ($line->description) {
        if ($line->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0) {
            $discount = new DiscountAbsolute($this->db);
            $discount->fetch($line->fk_remise_except);
            echo ($txt ? ' - ' : '') . $langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0));
        } elseif ($line->description == '(DEPOSIT)' && $objp->fk_remise_except > 0) {
            $discount = new DiscountAbsolute($this->db);
            $discount->fetch($line->fk_remise_except);
            echo ($txt ? ' - ' : '') . $langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0));
            // Add date of deposit
            if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) {
                echo ' (' . dol_print_date($discount->datec) . ')';
            }
        } else {
            echo ($txt ? ' - ' : '') . dol_htmlentitiesbr($line->description);
        }
    }
} else {
    $format = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE ? 'dayhour' : 'day';
    if ($line->fk_product > 0) {
        echo $form->textwithtooltip($text, $description, 3, '', '', $i, 0, !empty($line->fk_parent_line) ? img_picto('', 'rightarrow') : '');
        // Show range
        echo get_date_range($line->date_start, $line->date_end, $format);
        // Add description in form
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:objectline_view.tpl.php

示例5: printOriginLine

 /**
  * 	Return HTML with a line of table array of source object lines
  *  TODO Move this and previous function into output html class file (htmlline.class.php).
  *  If lines are into a template, title must also be into a template
  *  But for the moment we don't know if it's possible as we keep a method available on overloaded objects.
  * 	@param		line
  * 	@param		var
  */
 function printOriginLine($line, $var)
 {
     global $langs, $bc;
     //var_dump($line);
     $date_start = $line->date_debut_prevue;
     if ($line->date_debut_reel) {
         $date_start = $line->date_debut_reel;
     }
     $date_end = $line->date_fin_prevue;
     if ($line->date_fin_reel) {
         $date_end = $line->date_fin_reel;
     }
     $this->tpl['label'] = '';
     if (!empty($line->fk_parent_line)) {
         $this->tpl['label'] .= img_picto('', 'rightarrow');
     }
     if (($line->info_bits & 2) == 2) {
         $discount = new DiscountAbsolute($db);
         $discount->fk_soc = $this->socid;
         $this->tpl['label'] .= $discount->getNomUrl(0, 'discount');
     } else {
         if ($line->fk_product) {
             $productstatic = new Product($this->db);
             $productstatic->id = $line->fk_product;
             $productstatic->ref = $line->ref;
             $productstatic->type = $line->fk_product_type;
             $this->tpl['label'] .= $productstatic->getNomUrl(1);
             $this->tpl['label'] .= $line->label ? ' - ' . $line->label : '';
             // Dates
             if ($line->product_type == 1 && ($date_start || $date_end)) {
                 $this->tpl['label'] .= get_date_range($date_start, $date_end);
             }
         } else {
             $this->tpl['label'] .= $line->product_type == -1 ? '&nbsp;' : ($line->product_type == 1 ? img_object($langs->trans(''), 'service') : img_object($langs->trans(''), 'product'));
             $this->tpl['label'] .= $line->label ? '&nbsp;' . $line->label : '';
             // Dates
             if ($line->product_type == 1 && ($date_start || $date_end)) {
                 $this->tpl['label'] .= get_date_range($date_start, $date_end);
             }
         }
     }
     if ($line->desc) {
         if ($line->desc == '(CREDIT_NOTE)') {
             $discount = new DiscountAbsolute($this->db);
             $discount->fetch($line->fk_remise_except);
             $this->tpl['description'] = $langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0));
         } elseif ($line->desc == '(DEPOSIT)') {
             $discount = new DiscountAbsolute($this->db);
             $discount->fetch($line->fk_remise_except);
             $this->tpl['description'] = $langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0));
         } else {
             $this->tpl['description'] = dol_trunc($line->desc, 60);
         }
     } else {
         $this->tpl['description'] = '&nbsp;';
     }
     $this->tpl['vat_rate'] = vatrate($line->tva_tx, true);
     $this->tpl['price'] = price($line->subprice);
     $this->tpl['qty'] = ($line->info_bits & 2) != 2 ? $line->qty : '&nbsp;';
     $this->tpl['remise_percent'] = ($line->info_bits & 2) != 2 ? vatrate($line->remise_percent, true) : '&nbsp;';
     include DOL_DOCUMENT_ROOT . '/core/tpl/originproductline.tpl.php';
 }
开发者ID:netors,项目名称:dolibarr,代码行数:70,代码来源:commonobject.class.php


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