/**
  * @covers Acc_Ledger_Sold::confirm
  * @todo   Implement testConfirm().
  * @expectedException Exception
  */
 public function testConfirm()
 {
     $_POST['p_jrn'] = $this->object->id;
     $this->object->confirm(array());
 }
Exemplo n.º 2
0
 if (is_msie() == 0) {
     echo '<div style="position:absolute"  class="content">';
 } else {
     echo '<div class="content">';
 }
 $Ledger = new Acc_Ledger_Sold($cn, $_POST['p_jrn']);
 $internal = $Ledger->insert($_POST);
 /* Save the predefined operation */
 if (isset($_POST['opd_name']) && trim($_POST['opd_name']) != "") {
     $opd = new Pre_op_ven($cn);
     $opd->get_post();
     $opd->save();
 }
 /* Show button  */
 echo '<h1 style="float:right;margin-right:20%"> Enregistrement </h1>';
 echo $Ledger->confirm($_POST, true);
 /* Show link for Invoice */
 if (isset($Ledger->doc)) {
     echo '<h2>Document </h2>';
     echo $Ledger->doc;
 }
 /* Save the additional information into jrn_info */
 $obj = new Acc_Ledger_Info($cn);
 $obj->save_extra($Ledger->jr_id, $_POST);
 // extourne
 if (isset($_POST['reverse_ck'])) {
     $p_date = HtmlInput::default_value_post('reverse_date', '');
     if (isDate($p_date) == $p_date) {
         // reverse the operation
         try {
             $Ledger->reverse($p_date);