36$cn=Dossier::connect();
37$document_type=$p_follow_up->db->get_value(
"select ag_type from action_gestion where ag_id = $1",[$p_follow_up->ag_id]);
43<div
id=
"follow_up_detail">
45 <?php echo
h2(
_(
"Détail opération"),
'class="h-section"') ?>
50 <
th><?php echo
_(
'Fiche') ?></
th>
51 <
th><?php echo
_(
'Description') ?></
th>
52 <
th class=
"num"><?php echo
_(
'prix unitaire') ?></
th>
53 <
th class=
"num"><?php echo
_(
'quantité') ?></
th>
54 <
th class=
"num"><?php echo
_(
'Code TVA') ?></
th>
55 <
th class=
"num"><?php echo
_(
'Montant TVA') ?></
th>
56 <
th class=
"num"><?php echo
_(
'Montant TVAC') ?></
th>
67 $icard->name=
"e_march".$i;
68 $tmp_ad=(isset($p_follow_up->aAction_detail[
$i]))?$p_follow_up->aAction_detail[
$i]:
false;
74 $march=
new Fiche($p_follow_up->db);
79 $icard->value=$march->get_quick_code();
83 $icard->set_dblclick(
"fill_ipopcard(this);");
85 $icard->set_attribute(
'label',
"e_march".
$i.
"_label");
87 $icard->set_attribute(
'typecard', $icard->extra);
88 $icard->set_attribute(
'ipopup',
'ipopcard');
89 $icard->set_function(
'fill_data');
90 $icard->javascript=sprintf(
' onchange="fill_data_onchange(\'%s\');" ', $icard->name);
92 $icard->set_attribute(
'label',
'e_march' .
$i .
'_label');
94 if ( $option ==
'ACH'){
95 $icard->set_attribute(
'purchase',
'e_march' .
$i .
'_price');
97 $icard->set_attribute(
'price',
'e_march'.
$i.
'_price');
101 $icard->set_attribute(
'tvaid',
'e_march' .
$i .
'_tva_id');
106 $text->javascript=
' onchange="clean_tva('.$i.
');compute_ledger('.
$i.
')"';
108 $text->name=
"e_march".$i.
"_label";
115 $num->javascript=
' onchange="format_number(this,4);clean_tva('.$i.
');compute_ledger('.
$i.
')"';
116 $num->name=
"e_march".$i.
"_price";
117 $num->id=
"e_march".$i.
"_price";
123 $num->name=
"e_quant".$i;
124 $num->id=
"e_quant".$i;
129 $itva->name=
'e_march'.$i.
'_tva_id';
130 $itva->id=
'e_march'.$i.
'_tva_id';
133 $itva->js=
' onchange="format_number(this);clean_tva('.$i.
');compute_ledger('.
$i.
')"';
134 $itva->set_attribute(
'compute',
$i);
138 $num->name=
"e_march".$i.
"_tva_amount";
139 $num->id=
"e_march".$i.
"_tva_amount";
141 $num->javascript=
" onchange=\"compute_ledger('".$i.
" ')\"";
146 $num->name=
"tvac_march".$i;
147 $num->id=
"tvac_march".$i;
153 $aArticle[
$i][
'hidden_htva']=HtmlInput::hidden(
'htva_march'.$i, 0);
162 <TD
class=
"num"><?php echo
$aArticle[
$i][
'pu'] ?></TD>
163 <TD
class=
"num"><?php echo
$aArticle[
$i][
'quant'] ?></TD>
164 <TD
class=
"num"><?php echo
$aArticle[
$i][
'tvaid'] ?></TD>
165 <TD
class=
"num"><?php echo
$aArticle[
$i][
'tva'] ?></TD>
166 <TD
class=
"num"><?php echo
$aArticle[
$i][
'tvac'] ?>
178 <div
style=
" float:right;margin-right: 2px" id=
"sum">
184 <div
style=
"float:right;margin-right: 230px" >
191 <div
id=
"d_add_rows">
194 <?php echo HtmlInput::button(
'actualiser',
_(
'Recalculer'),
' onClick="compute_all_ledger();"'); ?>
196 <script>compute_all_ledger()</script>
202 <div
id=
"follow_up_detail_invoice" class=
"col m-3" style=
"position:static">
203 <div> <input
type=
"checkbox" id=
"invoice_cp_note" value=
"0"> Cocher pour copier la description dans la <b>note de la vente</b></div>
206 $(
'invoice_cp_note').addEventListener(
"change",
function () {
207 let cp= $(
'btncreate_invoice').attributes[
'href'].nodeValue;
208 if ( $(
'invoice_cp_note').checked) {
209 $(
'btncreate_invoice').attributes[
'href'].nodeValue= cp.replace(
'cp=0',
'cp=1')
211 $(
'btncreate_invoice').attributes[
'href'].nodeValue= cp.replace(
'cp=1',
'cp=0')
217 $query=http_build_query(array(
'gDossier'=>Dossier::id(),
'ag_id'=>$p_follow_up->ag_id,
'create_invoice'=>1,
'cp'=>0,
'ac'=>
$menu->get(
'code_invoice')));
218 echo HtmlInput::button_anchor(
_(
"Transformer en Facture de Vente"),
"do.php?".
$query,
"create_invoice",
219 ' target="_blank" ',
"button");
229 <div
id=
"follow_up_detail_feenote" class=
"col m-3" style=
"position:static">
230 <div> <input
type=
"checkbox" id=
"feenote_cp_note" value=
"0"> Cocher pour copier la description dans la <b>note de l
'achat ou note de frais</b></div>
233 $('feenote_cp_note
').addEventListener("change", function () {
234 let cp= $('btncreate_feenote
').attributes['href
'].nodeValue;
235 if ( $('feenote_cp_note
').checked) {
236 $('btncreate_feenote
').attributes['href
'].nodeValue= cp.replace('cp=0
','cp=1
')
238 $('btncreate_feenote
').attributes['href
'].nodeValue= cp.replace('cp=1
','cp=0
')
244 $query=http_build_query(array('cp
'=>0,'gDossier
'=>Dossier::id(), 'ag_id'=>$p_follow_up->ag_id, 'create_feenote
'=>1, 'ac
'=>$menu->get('code_feenote
')));
245 echo HtmlInput::button_anchor(_("Transformer en Note de frais ou Facture Achat"), "do.php?".$query, "create_feenote",
246 ' target=
"_blank" ', "button");
h2($p_string, $p_class="", $raw="")
th($p_string, $p_extra='', $raw='')
span($p_string, $p_extra='')
tr($p_string, $p_extra='')
if(!headers_sent())
– pour utiliser unoconv démarrer un server libreoffice commande libreoffice –headless –accept="socket...
_("actif, passif,charge,...")
static is_enable_make_feenote($p_document_type)
returns true if the operation_detail is enable, otherwise false
static is_enable_make_invoice($p_document_type)
returns true if the operation_detail is enable, otherwise false
static option_operation_detail($p_document_type)
returns option from the operation_detail
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
Input HTML for the card show buttons, in the file, you have to add card.js How to use :
This class handles only the numeric input, the input will call a javascript to change comma to period...