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


PHP nbm函数代码示例

本文整理汇总了PHP中nbm函数的典型用法代码示例。如果您正苦于以下问题:PHP nbm函数的具体用法?PHP nbm怎么用?PHP nbm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: display_html

 function display_html()
 {
     $idx = 0;
     $r = "";
     //---Html
     $array = $this->load();
     if (is_array($array) == false || empty($array)) {
         return 0;
     }
     $r .= '<table class="result" style="width=100%">';
     $r .= '<tr>' . '<th>' . _('Date') . '</th>' . '<th>' . _('Poste') . '</th>' . '<th>' . _('Quick_code') . '</th>' . '<th>' . _('Analytique') . '</th>' . th(_('Description')) . '<th>' . _('libelle') . '</th>' . '<th>' . _('Num.interne') . '</th>' . '<th>' . _('Montant') . '</th>' . '<th>' . _('D/C') . '</th>' . '</tr>';
     foreach ($array as $row) {
         $class = $idx % 2 == 0 ? 'even' : 'odd';
         $idx++;
         $r .= '<tr class="' . $class . '">';
         $detail = $row['jr_id'] != null ? HtmlInput::detail_op($row['jr_id'], $row['jr_internal']) : '';
         $post_detail = $row['j_poste'] != null ? HtmlInput::history_account($row['j_poste'], $row['j_poste']) : '';
         $card_detail = $row['f_id'] != null ? HtmlInput::history_card($row['f_id'], $row['qcode']) : '';
         $r .= '<td>' . $row['oa_date'] . '</td>' . td($post_detail) . td($card_detail) . '<td>' . h($row['po_name']) . '</td>' . '<td>' . h($row['oa_description']) . '</td>' . td($row['jr_comment']) . '<td>' . $detail . '</td>' . '<td class="num">' . nbm($row['oa_amount']) . '</td>' . '<td>' . ($row['oa_debit'] == 'f' ? 'CREDIT' : 'DEBIT') . '</td>';
         $r .= '</tr>';
     }
     $r .= '</table>';
     return $r;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:24,代码来源:class_anc_listing.php

示例2: export

 /**
  *@brief export the ledger in  PDF
  */
 function export()
 {
     bcscale(2);
     $a_jrn = $this->ledger->get_operation($_GET['from_periode'], $_GET['to_periode']);
     if ($a_jrn == null) {
         return;
     }
     for ($i = 0; $i < count($a_jrn); $i++) {
         /* initialize tva */
         for ($f = 0; $f < count($this->a_Tva); $f++) {
             $l = $this->a_Tva[$f]['tva_id'];
             $atva_amount[$l] = 0;
         }
         // retrieve info from ledger
         $aAmountVat = $this->ledger->vat_operation($a_jrn[$i]['jr_grpt_id']);
         // put vat into array
         for ($f = 0; $f < count($aAmountVat); $f++) {
             $l = $aAmountVat[$f]['tva_id'];
             $atva_amount[$l] = bcadd($atva_amount[$l], $aAmountVat[$f]['sum_vat']);
             $this->tp_tva[$l] = bcadd($this->tp_tva[$l], $aAmountVat[$f]['sum_vat']);
             $this->rap_tva[$l] = bcadd($this->rap_tva[$l], $aAmountVat[$f]['sum_vat']);
         }
         $row = $a_jrn[$i];
         $this->LongLine(15, 5, $row['pj'], 0);
         $this->Cell(10, 5, $row['date_fmt'], 0, 0);
         $this->Cell(13, 5, $row['internal'], 0, 0);
         list($qc, $name) = $this->get_tiers($row['id'], $this->jrn_type);
         $this->LongLine(40, 5, "[" . $qc . "]" . $name, 0, 'L');
         $this->LongLine(65, 5, mb_substr($row['comment'], 0, 150), 0, 'L');
         /* get other amount (without vat, total vat included, private, ND */
         $other = $this->ledger->get_other_amount($a_jrn[$i]['jr_grpt_id']);
         $this->tp_htva = bcadd($this->tp_htva, $other['price']);
         $this->tp_tvac = bcadd($this->tp_tvac, $other['price'] + $other['vat']);
         $this->tp_tva_np = bcadd($this->tp_tva_np, $other['tva_np']);
         $this->tp_priv = bcadd($this->tp_priv, $other['priv']);
         $this->tp_nd = bcadd($this->tp_nd, $other['tva_nd']);
         $this->rap_htva = bcadd($this->rap_htva, $other['price']);
         $this->rap_tvac = bcadd($this->rap_tvac, bcadd($other['price'], bcsub($other['vat'], $other['tva_np'])));
         $this->rap_priv = bcadd($this->rap_priv, $other['priv']);
         $this->rap_nd = bcadd($this->rap_nd, $other['tva_nd']);
         $this->rap_tva_np = bcadd($this->rap_tva_np, $other['tva_np']);
         $this->Cell(15, 5, nbm($other['price']), 0, 0, 'R');
         if ($this->jrn_type != 'VEN') {
             $this->Cell(15, 5, nbm($other['priv']), 0, 0, 'R');
             $this->Cell(15, 5, nbm($other['tva_nd']), 0, 0, 'R');
         }
         $this->Cell(15, 5, nbm($other['tva_np']), 0, 0, 'R');
         foreach ($atva_amount as $row_atva_amount) {
             $this->Cell(15, 5, nbm($row_atva_amount), 0, 0, 'R');
         }
         $l_tvac = bcadd($other['price'], bcsub($other['vat'], $other['tva_np']));
         $l_tvac = bcadd($l_tvac, $other['tva_nd']);
         $this->Cell(15, 5, nbm($l_tvac), 0, 0, 'R');
         $this->Ln(5);
     }
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:59,代码来源:class_print_ledger_simple.php

示例3: header

header('Content-type: application/csv');
header('Content-Disposition: attachment;filename="stock-summary-list.csv"', FALSE);
?>
"Depot";"Adresse";"Ville";"Pays";"Code Stock";"Fiches";"IN";"OUT";"DIFF"
<?php 
$a_repo = $cn->get_array("select distinct t.r_id,r_name,r_adress,r_city,r_country from stock_repository as s join tmp_stockgood_detail as t\n\ton (s.r_id=t.r_id)\n\twhere\n\ts_id=\$1\n\torder by 2\n\t", array($tmp_id));
for ($r = 0; $r < count($a_repo); $r++) {
    $a_stock = $cn->get_array("\n\t\t\t\t\tselect coalesce(sum(s_qin),0) as qin,coalesce(sum(s_qout),0) as qout,sg_code\n\t\t\t\t\t\tfrom tmp_stockgood_detail  where r_id=\$1 and s_id=\$2\n\t\t\t\t\t\tgroup by sg_code\n\t\t\t\t\t\torder by sg_code\n\n\t\t\t\t\t", array($a_repo[$r]['r_id'], $tmp_id));
    for ($s = 0; $s < count($a_stock); $s++) {
        $a_card = $cn->get_array("\n\t\t\t\t\t\tselect f_id,vw_name,quick_code\n\t\t\t\t\t\tfrom vw_fiche_attr\n\t\t\t\t\t\twhere\n\t\t\t\t\t f_id in (\n\t\t\t\t\t\tselect distinct f_id from fiche_detail\n\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\tad_id=19 and\n\t\t\t\t\t\t\tad_value=\$1)\n\t\t\t\t\t\torder by vw_name,quick_code\n\t\t\t\t\t", array($a_stock[$s]['sg_code']));
        printf('"%s";', $a_repo[$r]['r_name']);
        printf('"%s";', $a_repo[$r]['r_adress']);
        printf('"%s";', $a_repo[$r]['r_city']);
        printf('"%s";', $a_repo[$r]['r_country']);
        printf('"%s";', $a_stock[$s]['sg_code']);
        $sep = "";
        for ($c = 0; $c < count($a_card); $c++) {
            $a = sprintf('[%s] %s', $a_card[$c]['quick_code'], $a_card[$c]['vw_name']);
            $sep = "  / ";
        }
        // for C
        if (count($a_card) == 0) {
            $a = ' Erreur Code non utilisé';
        }
        printf('"%s";', $a);
        printf('%s;', nbm($a_stock[$s]['qin']));
        printf('%s;', nbm($a_stock[$s]['qout']));
        printf('%s', nbm(bcsub($a_stock[$s]['qin'], $a_stock[$s]['qout'])));
        printf("\r\n");
    }
}
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:export_stock_resume_list.php

示例4: display_html

 function display_html()
 {
     $r = "";
     $array = $this->load();
     $odd = 0;
     if (is_array($array) == false) {
         return $array;
     }
     $old = "";
     $tot_deb = 0;
     $tot_cred = 0;
     foreach ($array as $row) {
         $odd++;
         $r .= $odd % 2 == 0 ? '<tr class="odd">' : '<tr class="even">';
         if ($old == $row['a_po_name']) {
             $r .= '<td></td>';
         } else {
             if ($tot_deb != 0 || $tot_cred != 0) {
                 $r .= "<tr>" . td('');
                 $r .= "<td>Total </td>" . td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"');
                 $s = abs($tot_deb - $tot_cred);
                 $d = $tot_deb > $tot_cred ? 'debit' : 'credit';
                 $r .= "<td class=\"num\">" . nbm($s) . "</td><td>{$d}</td>";
                 $r .= "</tr>";
             }
             $tot_deb = 0;
             $tot_cred = 0;
             // new
             $r .= "</table>";
             $r .= "<table class=\"result\" style=\"margin-bottom:3px\">";
             $r .= "<tr>";
             $r .= "<th style=\"width:30%\" >Poste comptable Analytique</th>";
             $r .= "<th style=\"width:30%\">Poste comptable Analytique</th>";
             $r .= "<th style=\"text-align:right\">D&eacute;bit</th>";
             $r .= "<th style=\"text-align:right\">Cr&eacute;dit</th>";
             $r .= "<th style=\"text-align:right\">Solde</th>";
             $r .= "<th>D/C</th>";
             $r .= "</tr>";
             $r .= '<tr>';
             $r .= td($row['a_po_name'] . ' ' . $row['a_po_description']);
             $old = $row['a_po_name'];
             $r .= '</tr>';
             $r .= '<tr>';
             $r .= td('');
         }
         $tot_deb += $row['a_d'];
         $tot_cred += $row['a_c'];
         $r .= td($row['b_po_name'] . " " . $row['b_po_description']);
         $r .= td(nbm($row['a_d']), ' class="num"');
         $r .= td(nbm($row['a_c']), ' class="num"');
         $r .= td(nbm($row['a_solde']), ' class="num"');
         $r .= sprintf("<td>%s</td>", $row['a_debit']);
         $r .= "</tr>";
     }
     /* end loop */
     if ($tot_deb != 0 || $tot_cred != 0) {
         $r .= "<tr>" . td('');
         $r .= "<td>Total </td> <td ' class=\"num\"> " . nbm($tot_deb) . " </td> <td ' class=\"num\">" . nbm($tot_cred) . "</td>";
         $s = abs($tot_deb - $tot_cred);
         $d = $tot_deb > $tot_cred ? 'debit' : 'credit';
         $r .= td(nbm($s), ' class="num"') . "<td>{$d}</td>";
         $r .= "</tr>";
     }
     $r .= "</table>";
     $r .= h2info('Résumé');
     $r .= '<table class="result">';
     $r .= '<tr>';
     $r .= th('Po') . th('Nom') . th('Débit', ' style="text-align:right"') . th('Crédit', 'style="text-align:right" ') . th('Solde', ' style="text-align:right"');
     $sum = $this->show_sum($array);
     $tot_cred = 0;
     $tot_deb = 0;
     foreach ($sum as $row) {
         $r .= '<tr>';
         $r .= '<td>' . $row['poste'] . '</td>';
         $r .= '<td>' . $row['desc'] . '</td>';
         $r .= '<td class="num">' . nbm($row['debit']) . '</td>';
         $r .= '<td class="num">' . nbm($row['credit']) . '</td>';
         $diff = bcsub($row['debit'], $row['credit']);
         $tot_cred = bcadd($tot_cred, $row['credit']);
         $tot_deb = bcadd($tot_deb, $row['debit']);
         $r .= td(nbm($diff), ' class="num" ');
         $r .= '<td>' . $row['dc'] . '</td>';
         $r .= '</tr>';
     }
     $r .= td('');
     $r .= td('total');
     $r .= td(nbm($tot_deb), 'class="num"');
     $r .= td(nbm($tot_cred), 'class="num"');
     $solde = bcsub($tot_deb, $tot_cred);
     $sign = $tot_cred < $tot_deb ? " - " : " + ";
     $r .= td($sign . nbm($solde), 'class="num" style="border:solid 1px blue;font-weight:bold"');
     $r .= '</tr>';
     $r .= '</table>';
     return $r;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:95,代码来源:class_anc_balance_double.php

示例5: td

            $str_anc .= td(nbm($htva));
            $str_anc .= $anc_op->display_table(1, $htva, $div);
        } else {
            $row .= td('');
        }
    }
    $class = $e % 2 == 0 ? ' class="even"' : 'class="odd"';
    echo tr($row, $class);
}
if ($owner->MY_TVA_USE == 'Y') {
    $row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"');
} else {
    $row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"');
}
$row .= td(nbm($total_htva), 'class="num" style="font-style:italic;font-weight: bolder;"');
if ($owner->MY_TVA_USE == 'Y') {
    $row .= td("") . td("") . td(nbm($total_tvac), 'class="num" style="font-style:italic;font-weight: bolder;"');
}
echo tr($row);
?>
            </table>


        </div>


<?php 
require_once NOALYSS_INCLUDE . '/template/ledger_detail_bottom.php';
?>
</div>
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:30,代码来源:ledger_detail_ach.php

示例6: foreach

 echo $r;
 // show all dossiers
 if ($Res != null) {
     foreach ($Res as $Dossier) {
         if ($compteur % 2 == 0) {
             $cl = 'class="odd"';
         } else {
             $cl = 'class="even"';
         }
         echo "<TR id=\"folder{$Dossier['dos_id']}\" {$cl}><TD style=\"vertical-align:top\"> " . $Dossier['dos_id'] . "</td><td> <B>" . h($Dossier['dos_name']) . "</B> </TD>";
         $str_name = domaine . 'dossier' . $Dossier['dos_id'];
         echo "<TD><I>  " . h($Dossier['dos_description']) . "</I></td>";
         $database_exist = $repocn->exist_database($str_name);
         if ($database_exist > 0) {
             $size = $repocn->get_value("select pg_database_size(\$1)/(1024*1024)::float", array($str_name));
             echo td(nbm($size) . "MB", ' style="text-align:right"');
         } else {
             echo td(_("Dossier inexistant"), 'style="color:red"');
         }
         echo td($str_name);
         if ($database_exist > 0) {
             echo td(HtmlInput::anchor(_('Effacer'), '?action=dossier_mgt&sa=del&d=' . $Dossier['dos_id'], " onclick=\"folder_drop('" . $Dossier['dos_id'] . "')\""));
             echo td(HtmlInput::anchor(_('Modifier'), '?action=dossier_mgt&sa=mod&d=' . $Dossier['dos_id'], " onclick=\"folder_modify('" . $Dossier['dos_id'] . "')\""));
             echo td(HtmlInput::anchor(_('Backup'), 'backup.php?action=backup&sa=b&t=d&d=' . $Dossier['dos_id']));
         } else {
             echo td(HtmlInput::anchor(_('Effacer'), '?action=dossier_mgt&sa=del&d=' . $Dossier['dos_id'], " onclick=\"folder_drop('" . $Dossier['dos_id'] . "')\""));
         }
         $compteur++;
     }
     echo "</TR>";
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:dossier.inc.php

示例7: th

 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
/* $Revision$ */
// Copyright Author Dany De Bontridder danydb@aevalys.eu
/**
 * @file
 * @brief show detail of a operation of fin
 *
 */
echo '<table class="result">';
echo '<tr>';
echo th(_('Compte en banque'));
echo th(_('Tiers'));
echo th(_('Libellé'));
echo th(_('Montant'));
echo '</tr>';
echo '<tr>';
$bk = new Fiche($cn, $obj->det->array[0]['qf_bank']);
$view_card_detail = HtmlInput::card_detail($bk->get_quick_code(), h($bk->getName()), ' class="line" ');
echo td($view_card_detail);
$other = new Fiche($cn, $obj->det->array[0]['qf_other']);
$view_card_detail = HtmlInput::card_detail($other->get_quick_code(), h($other->getName()), ' class="line" ');
echo td($view_card_detail);
$comment = strip_tags($obj->det->jr_comment);
echo td($comment);
echo td(nbm($obj->det->array[0]['qf_amount']), ' class="inum"');
echo '</tr>';
echo '</table>';
?>

开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:29,代码来源:operation_detail_fin.php

示例8: sprintf

                    // get sum for this lettering
                    $pdf->Cell($tab[7], 4, sprintf('%s', nbm($row['letter_diff'])), '0', '0', $align[7], $fill);
                } else {
                    $pdf->Cell($tab[6], 4, "", 0, 0, 'R', $fill);
                }
                $pdf->Ln();
            }
            $pdf->SetFillColor(0, 0, 0);
            $pdf->SetFont('DejaVuCond', 'B', 8);
            $debit = sprintf('Debit  : %s', nbm($amount_deb));
            $credit = sprintf('Credit : %s', nbm($amount_cred));
            if ($amount_deb > $amount_cred) {
                $s = 'solde débiteur';
            } else {
                $s = 'solde crediteur';
            }
            $solde = sprintf('%s  : %s', $s, nbm(abs(round($amount_cred - $amount_deb, 2))));
            $pdf->Cell(0, 6, $debit, 0, 0, 'R');
            $pdf->ln(4);
            $pdf->Cell(0, 6, $credit, 0, 0, 'R');
            $pdf->ln(4);
            $pdf->Cell(0, 6, $solde, 0, 0, 'R');
            $pdf->ln(4);
            $pdf->Ln();
        }
    }
}
//Save PDF to file
$fDate = date('dmy-Hi');
$pdf->Output("category-{$fDate}.pdf", 'D');
exit;
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:export_fiche_balance_pdf.php

示例9: array

         $name = $cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1', array($q[$e]['j_poste']));
         $l_lib = $name;
     }
 }
 $l_lib = strip_tags($l_lib);
 if ($owner->MY_UPDLAB == 'Y') {
     $hidden = HtmlInput::hidden("j_id[]", $q[$e]['j_id']);
     $input = new IText("e_march" . $q[$e]['j_id'] . "_label", $l_lib);
     $input->css_size = "100%";
 } else {
     $input = new ISpan("e_march" . $q[$e]['j_id'] . "_label");
     $input->value = $l_lib;
     $hidden = HtmlInput::hidden("j_id[]", $q[$e]['j_id']);
 }
 $row .= td($input->input() . $hidden);
 $montant = td(nbm($q[$e]['j_montant']), 'class="num"');
 $row .= $q[$e]['j_debit'] == 't' ? $montant : td('');
 $row .= $q[$e]['j_debit'] == 'f' ? $montant : td('');
 /* Analytic accountancy */
 if ($owner->MY_ANALYTIC != "nu") {
     if (preg_match('/^(6|7)/', $q[$e]['j_poste'])) {
         echo HtmlInput::hidden("amount_t" . $amount_idx, $q[$e]['j_montant']);
         $anc_op = new Anc_Operation($cn);
         $anc_op->j_id = $q[$e]['j_id'];
         $anc_op->in_div = $div;
         $str_anc .= '<tr>';
         $str_anc .= HtmlInput::hidden('op[]', $anc_op->j_id);
         $str_anc .= td($q[$e]['j_qcode']);
         $str_anc .= td($q[$e]['j_poste']);
         $str_anc .= td($q[$e]['j_montant']);
         $str_anc .= $anc_op->display_table(1, $q[$e]['j_montant'], $div);
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:ledger_detail_misc.php

示例10: nbm

    }
    ?>
		</td>
		<td>
			<?php 
    echo $row['ccomment'];
    ?>
		</td>
		<td class="num">
			<?php 
    echo nbm($row['j_montant']);
    ?>
		</td>
		<td class="num">
			<?php 
    echo nbm($row['sg_quantity']);
    ?>
		</td>
		<td>
			<?php 
    echo $row['direction'];
    ?>
		</td>
	</tr>
	<?php 
}
?>
</table>
	<?php 
echo $nav_bar;
?>
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:stock_histo.php

示例11: nbm

        $pdf->Cell($width[$i], 6, $detail['cred_montant'] > 0 ? nbm($detail['cred_montant']) : '', 0, 0, $lor[$i]);
        $i++;
        $pdf->Cell($width[$i], 6, nbm(abs($solde)) . $side, 0, 0, $lor[$i]);
        $i++;
        $pdf->Ln();
    }
    $pdf->SetFont('DejaVuCond', 'B', 8);
    $i = 0;
    $pdf->Cell($width[$i], 6, $current_exercice, 0, 0, $lor[$i]);
    $i++;
    $pdf->Cell($width[$i], 6, '', 0, 0, $lor[$i]);
    $i++;
    $pdf->Cell($width[$i], 6, '', 0, 0, $lor[$i]);
    $i++;
    $pdf->Cell($width[$i], 6, '', 0, 0, $lor[$i]);
    $i++;
    $pdf->Cell($width[$i], 6, 'Total du compte ' . $Poste->id, 0, 0, 'R');
    $i++;
    $pdf->Cell($width[$i], 6, $solde_d > 0 ? nbm($solde_d) : '', 0, 0, $lor[$i]);
    $i++;
    $pdf->Cell($width[$i], 6, $solde_c > 0 ? nbm($solde_c) : '', 0, 0, $lor[$i]);
    $i++;
    $pdf->Cell($width[$i], 6, nbm(abs($solde_c - $solde_d)), 0, 0, $lor[$i]);
    $i++;
    $pdf->Cell(5, 6, $solde_c > $solde_d ? 'C' : 'D', 0, 0, 'L');
    $pdf->Ln();
    $pdf->Ln();
}
//Save PDF to file
$pdf->Output("gl_comptes.pdf", 'D');
exit;
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:export_gl_pdf.php

示例12: foreach

        }
        foreach ($a_sum as $a) {
            $lvl1[$a] = bcadd($lvl1[$a], $r[$a]);
            $lvl2[$a] = bcadd($lvl2[$a], $r[$a]);
            $lvl3[$a] = bcadd($lvl3[$a], $r[$a]);
        }
        echo '<TR class="' . $tr . '">';
        echo td($view_history);
        echo td(h($r['label']));
        if ($previous == 1) {
            echo td(nbm($r['sum_deb_previous']), ' class="previous_year"');
            echo td(nbm($r['sum_cred_previous']), ' class="previous_year" ');
            echo td(nbm($r['solde_deb_previous']), ' class="previous_year"');
            echo td(nbm($r['solde_cred_previous']), 'class="previous_year" ');
            if (isset($_GET['lvl1']) || isset($_GET['lvl2']) || isset($_GET['lvl3'])) {
                echo '<td></td>';
            }
        }
        echo td(nbm($r['sum_deb']), 'style="text-align:right;"');
        echo td(nbm($r['sum_cred']), 'style="text-align:right;"');
        echo td(nbm($r['solde_deb']), 'style="text-align:right;"');
        echo td(nbm($r['solde_cred']), 'style="text-align:right;"');
        if (isset($_GET['lvl1']) || isset($_GET['lvl2']) || isset($_GET['lvl3'])) {
            echo '<td></td>';
        }
        echo '</TR>';
    }
    echo '</table>';
}
// end submit
echo "</div>";
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:balance.inc.php

示例13: Fiche

    $row = '';
    $q = $detail->det->array;
    $fiche = new Fiche($cn);
    $fiche->get_by_qcode($q[$e]['j_qcode']);
    /* Analytic accountancy */
    if ($owner->MY_ANALYTIC != "nu") {
        $poste = $fiche->strAttribut(ATTR_DEF_ACCOUNT);
        if (preg_match('/^(6|7)/', $q[$e]['j_poste'])) {
            $qcode = $fiche->strAttribut(ATTR_DEF_QUICKCODE);
            $anc_op = new Anc_Operation($cn);
            $anc_op->j_id = $q[$e]['j_id'];
            $anc_op->in_div = $div;
            $str_anc .= '<tr>';
            $str_anc .= td($poste);
            $str_anc .= td($qcode);
            $str_anc .= td(nbm($q[$e]['j_montant']));
            $str_anc .= '<td>';
            $str_anc .= HtmlInput::hidden('op[]', $anc_op->j_id);
            $montant = $q[$e]['j_debit'] == "t" ? $q[$e]['j_montant'] : bcmul($q[$e]['j_montant'], -1);
            $str_anc .= $anc_op->display_table(1, $montant, $div);
            $str_anc .= '</td>';
            $str_anc .= '</tr>';
        }
    }
}
?>
</div>
<?php 
require_once NOALYSS_INCLUDE . '/template/ledger_detail_bottom.php';
?>
</div>
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:31,代码来源:ledger_detail_fin.php

示例14: confirm


//.........这里部分代码省略.........
     $ret .= "<tr>";
     $ret .= "<th>" . _('Quick Code ou ');
     $ret .= _("Poste") . " </th>";
     $ret .= "<th style=\"text-align:left\"> " . _("Libellé") . " </th>";
     $ret .= "<th style=\"text-align:right\">" . _("Débit") . "</th>";
     $ret .= "<th style=\"text-align:right\">" . _("Crédit") . "</th>";
     /* if we use the AC */
     if ($g_parameter->MY_ANALYTIC != 'nu') {
         $anc = new Anc_Plan($this->db);
         $a_anc = $anc->get_list();
         $x = count($a_anc);
         /* set the width of the col */
         $ret .= '<th colspan="' . $x . '" style="width:auto;text-align:center" >' . _('Compt. Analytique') . '</th>';
         /* add hidden variables pa[] to hold the value of pa_id */
         $ret .= Anc_Plan::hidden($a_anc);
     }
     $ret .= "</tr>";
     $ret .= HtmlInput::hidden('e_date', $e_date);
     $ret .= HtmlInput::hidden('desc', $desc);
     $ret .= HtmlInput::hidden('period', $lPeriode->p_id);
     $ret .= HtmlInput::hidden('e_pj', $e_pj);
     $ret .= HtmlInput::hidden('e_pj_suggest', $e_pj_suggest);
     $mt = microtime(true);
     $ret .= HtmlInput::hidden('mt', $mt);
     // For predefined operation
     $ret .= HtmlInput::hidden('e_comm', $desc);
     $ret .= HtmlInput::hidden('jrn_type', $this->get_type());
     $ret .= HtmlInput::hidden('p_jrn', $this->id);
     $ret .= HtmlInput::hidden('nb_item', $nb_item);
     if ($this->with_concerned == true) {
         $ret .= HtmlInput::hidden('jrn_concerned', $jrn_concerned);
     }
     $ret .= dossier::hidden();
     $count = 0;
     for ($i = 0; $i < $nb_item; $i++) {
         if ($p_readonly == true) {
             if (!isset(${'qc_' . $i})) {
                 ${'qc_' . $i} = '';
             }
             if (!isset(${'poste' . $i})) {
                 ${'poste' . $i} = '';
             }
             if (!isset(${'amount' . $i})) {
                 ${'amount' . $i} = '';
             }
         }
         $class = $i % 2 == 0 ? ' class="even" ' : ' class="odd" ';
         $ret .= "<tr {$class}> ";
         if (trim(${'qc_' . $i}) != "") {
             $oqc = new Fiche($this->db);
             $oqc->get_by_qcode(${'qc_' . $i}, false);
             $strPoste = $oqc->strAttribut(ATTR_DEF_ACCOUNT);
             $ret .= "<td>" . ${'qc_' . $i} . ' - ' . $oqc->strAttribut(ATTR_DEF_NAME) . HtmlInput::hidden('qc_' . $i, ${'qc_' . $i}) . '</td>';
         }
         if (trim(${'qc_' . $i}) == "" && trim(${'poste' . $i}) != "") {
             $oposte = new Acc_Account_Ledger($this->db, ${'poste' . $i});
             $strPoste = $oposte->id;
             $ret .= "<td>" . h(${"poste" . $i} . " - " . $oposte->get_name()) . HtmlInput::hidden('poste' . $i, ${'poste' . $i}) . '</td>';
         }
         if (trim(${'qc_' . $i}) == "" && trim(${'poste' . $i}) == "") {
             continue;
         }
         $ret .= "<td>" . h(${"ld" . $i}) . HtmlInput::hidden('ld' . $i, ${'ld' . $i});
         $ret .= isset(${"ck{$i}"}) ? HtmlInput::hidden('ck' . $i, ${'ck' . $i}) : "";
         $ret .= "</td>";
         if (isset(${"ck{$i}"})) {
             $ret .= "<td class=\"num\">" . nbm(${"amount" . $i}) . HtmlInput::hidden('amount' . $i, ${'amount' . $i}) . "</td>" . td("");
             $total_deb = bcadd($total_deb, ${'amount' . $i});
         } else {
             $ret .= td("") . "<td class=\"num\">" . nbm(${"amount" . $i}) . HtmlInput::hidden('amount' . $i, ${'amount' . $i}) . "</td>";
             $total_cred = bcadd($total_cred, ${"amount" . $i});
         }
         /*$ret.="<td>";
         		$ret.=(isset(${"ck$i"})) ? HtmlInput::hidden('ck' . $i, ${'ck' . $i}) : "";
         		$ret.="</td>";*/
         // CA
         if ($g_parameter->MY_ANALYTIC != 'nu') {
             if (preg_match("/^[6,7]+/", $strPoste) == 1) {
                 // show form
                 $op = new Anc_Operation($this->db);
                 $null = $g_parameter->MY_ANALYTIC == 'op' ? 1 : 0;
                 $p_array['pa_id'] = $a_anc;
                 /* op is the operation it contains either a sequence or a jrnx.j_id */
                 $ret .= HtmlInput::hidden('op[]=', $i);
                 $ret .= '<td style="text-align:center">';
                 $read = $p_readonly == true ? 0 : 1;
                 $ret .= $op->display_form_plan($p_array, $null, $read, $count, round(${'amount' . $i}, 2));
                 $ret .= '</td>';
                 $count++;
             }
         }
         $ret .= "</tr>";
     }
     $ret .= tr(td('') . td(_('Totaux')) . td($total_deb, 'class="num"') . td($total_cred, 'class="num"'), 'class="highlight"');
     $ret .= "</table>";
     if ($g_parameter->MY_ANALYTIC != 'nu' && $p_readonly == false) {
         $ret .= '<input type="button" class="button" value="' . _('verifie Imputation Analytique') . '" onClick="verify_ca(\'\');">';
     }
     return $ret;
 }
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:101,代码来源:class_acc_ledger.php

示例15: nbm

    <td class="num">
        <?php 
echo nbm($tot_cum_price);
?>
    </td>
    <td class="num">
        <?php 
echo nbm($tot_cum_nd);
?>
    </td>
    <td>
        
    </td>
    <td class="num">
        <?php 
echo nbm($tot_cum_vat);
?>
    </td>
    <td class="num">
        <?php 
echo nbm($tot_cum_nd_tva);
?>
    </td>
    <td class="num">
        <?php 
echo nbm($tot_cum_tvac);
?>
    </td>
    </tfoot>
</table>        
开发者ID:Kloadut,项目名称:noalyss_ynh,代码行数:30,代码来源:impress_reconciliation_detail.php


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