FS#125 - after saving, for the different ledger we have a link to the detail of the operation
This commit is contained in:
parent
e141ad855f
commit
28cba09d46
6 changed files with 21 additions and 8 deletions
|
|
@ -64,7 +64,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger {
|
|||
|
||||
|
||||
/* check for a double reload */
|
||||
if ( isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1',array($mt)) != 0 )
|
||||
if ( isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1',array($mt)) != 0 )
|
||||
throw new Exception (_('Double Encodage'),5);
|
||||
|
||||
/* check if there is a customer */
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
|
|||
public function verify($p_array) {
|
||||
extract ($p_array);
|
||||
/* check for a double reload */
|
||||
if ( isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1',array($mt)) != 0 )
|
||||
if ( isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1',array($mt)) != 0 )
|
||||
throw new Exception (_('Double Encodage'),5);
|
||||
|
||||
/* check if we can write into this ledger */
|
||||
|
|
|
|||
|
|
@ -158,7 +158,9 @@ if ( $def==1 || $def == 4 ) {
|
|||
}
|
||||
|
||||
/* Show button */
|
||||
echo '<h2 class="info">'.$Ledger->get_name().'</h2>';
|
||||
$jr_id=$cn->get_value('select jr_id from jrn where jr_internal=$1',array($internal));
|
||||
|
||||
echo '<h2 class="info" style="margin-left:20%;width:60%;margin-right:20%;">'.$Ledger->get_name().'</h2>';
|
||||
echo "<h2 >"._('Opération sauvée')." $internal ";
|
||||
if ( $Ledger->pj != '') echo ' Piece : '.h($Ledger->pj);
|
||||
echo "</h2>";
|
||||
|
|
@ -171,7 +173,8 @@ if ( $def==1 || $def == 4 ) {
|
|||
/* Save the additional information into jrn_info */
|
||||
$obj=new Acc_Ledger_Info($cn);
|
||||
$obj->save_extra($Ledger->jr_id,$_POST);
|
||||
|
||||
printf ('<a class="detail" style="display:inline" href="javascript:modifyOperation(%d,%d)">%s</a><hr>',
|
||||
$jr_id,dossier::id(),$internal);
|
||||
echo HtmlInput::button_anchor(_('Nouvelle dépense'),$href.'?p_action=ach&sa=n&'.dossier::get());
|
||||
echo '</div>';
|
||||
exit();
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ if ( $def == 1 ) {
|
|||
if ( !isset($correct)) {
|
||||
echo '<div class="content">';
|
||||
$a= $Ledger->insert($_POST);
|
||||
echo '<h2 class="info">'._('Opération sauvée').' </h2>';
|
||||
echo '<h2 class="info" style="margin-left:20%;width:60%;margin-right:20%;">'._('Opération sauvée').' </h2>';
|
||||
echo $a;
|
||||
echo '</div>';
|
||||
echo '<div class="content">';
|
||||
|
|
|
|||
|
|
@ -171,16 +171,22 @@ if ( $def==1 || $def == 4 ) {
|
|||
}
|
||||
|
||||
/* Show button */
|
||||
echo '<h2 class="info">'.$Ledger->get_name().'</h2>';
|
||||
echo "<h2 >"._('Opération sauvée')." $internal ";
|
||||
echo '<h2 class="info" style="margin-left:20%;width:60%;margin-right:20%;">'.$Ledger->get_name().'</h2>';
|
||||
$jr_id=$cn->get_value('select jr_id from jrn where jr_internal=$1',array($internal));
|
||||
|
||||
echo "<h2 >"._('Opération sauvée');
|
||||
if ( $Ledger->pj != '') echo ' Piece : '.h($Ledger->pj);
|
||||
echo "</h2>";
|
||||
if ( strcmp($Ledger->pj,$_POST['e_pj']) != 0 ) {
|
||||
echo '<h3 class="notice"> '._('Attention numéro pièce existante, elle a du être adaptée').'</h3>';
|
||||
}
|
||||
|
||||
printf ('<a class="detail" style="display:inline" href="javascript:modifyOperation(%d,%d)">%s</a><hr>',
|
||||
$jr_id,dossier::id(),$internal);
|
||||
/* Show link for Invoice */
|
||||
if (isset ($Ledger->doc) ) { echo $Ledger->doc; echo '<hr>';}
|
||||
|
||||
|
||||
/* Save the additional information into jrn_info */
|
||||
$obj=new Acc_Ledger_Info($cn);
|
||||
$obj->save_extra($Ledger->jr_id,$_POST);
|
||||
|
|
|
|||
|
|
@ -283,10 +283,14 @@ if ( isset($_POST['save_it' ])) {
|
|||
|
||||
try {
|
||||
$ledger->save($array);
|
||||
echo '<h2> Opération enregistrée '.$ledger->jr_internal.' Piece '.h($ledger->pj).'</h2>';
|
||||
$jr_id=$cn->get_value('select jr_id from jrn where jr_internal=$1',array($ledger->internal));
|
||||
|
||||
echo '<h2> Opération enregistrée Piece '.h($ledger->pj).'</h2>';
|
||||
if ( strcmp($ledger->pj,$_POST['e_pj']) != 0 ) {
|
||||
echo '<h3 class="notice">'._('Attention numéro pièce existante, elle a du être adaptée').'</h3>';
|
||||
}
|
||||
printf ('<a class="detail" style="display:inline" href="javascript:modifyOperation(%d,%d)">%s</a><hr>',
|
||||
$jr_id,dossier::id(),$ledger->internal);
|
||||
|
||||
echo HtmlInput::button_anchor(_('Autre opération dans ce journal'),
|
||||
"?".dossier::get().
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue