Si le montant de TVA est égal à 0, il sera automatiquement calculé'; // First we show the menu // If nothing is asked the propose a blank form // to enter a new invoice if ( ! isset ($_REQUEST['p_jrn'])) { // no journal are selected so we select the first one $p_jrn=GetFirstJrnIdForJrnType(dossier::id(),'ACH'); } else { $p_jrn=$_REQUEST['p_jrn']; } // for the back button $retour=""; $h_url=""; if ( isset ($_REQUEST['url'])) { $retour=sprintf('',urldecode($_REQUEST['url'])); $h_url=sprintf('',urldecode($_REQUEST['url'])); } $sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:""; //-------------------------------------------------------------------------------- // use a predefined operation //-------------------------------------------------------------------------------- if ( $sub_action=="use_opd" ) { $op=new Pre_op_ach($cn); $op->set_od_id($_REQUEST['pre_def']); $p_post=$op->compute_array(); echo_debug(__FILE__.':'.__LINE__.'- ','p_post = ',$p_post); // Submit button in the form $submit=' '; $form=FormAchInput($cn,$_GET['p_jrn'],$User->get_periode(),$p_post,$submit,false,$p_post['nb_item']); // $form=FormAchInput($cn,$p_jrn,$User->get_periode(),$_POST,$submit,false,$nb_item); echo '