Menu

#1 Adding delete button To the list of New Journal Added

0.93.0-Beta
closed
5
2003-02-21
2003-02-21
No

When adding New Journal, if seem to be not way to
delete or edit the wrongly added New Journal. And
Restart another another new Journal seem to be the only
way.

A Delete or Edit will be added for good.

Discussion

  • Chan Min Wai

    Chan Min Wai - 2003-02-21

    Logged In: YES
    user_id=402754

    The Delete is done Edit will be did if require...

    This is the Patch
    RCS file: /cvsroot/arias/arias/gljouradd.php,v
    retrieving revision 1.2
    diff -r1.2 gljouradd.php
    18a19,23
    > } elseif ($delete) {
    > $recordSet =
    &$conn->SelectLimit("select id from
    gltransvoucher".$userid." where
    voucher=".sqlprep($voucher)." order by lastchangedate desc",1);
    > if (!$recordSet||$recordSet->EOF)
    die(texterror('Error retrieving voucher info.'));
    > $voucherid=$recordSet->fields[0];
    > if ($conn->Execute("delete from
    gltransaction".$userid." where
    glaccountid='".$glaccountid."' and
    voucherid='".$voucherid."' and amount='".$amount."'") ===
    false) echo texterror("Error deleting voucher detail.");
    77,78c82,83
    < $recordSet=&$conn->Execute('select
    glaccount.name,glaccount.description,gltransaction'.$userid.'.amount
    from gltransaction'.$userid.', glaccount where
    gltransaction'.$userid.'.glaccountid=glaccount.id');
    < if ($recordSet&&!$recordSet->EOF)
    echo '<br><br><table
    border="1"><tr><th>Account</th><th>Account
    Description</th><th>Amount</th></tr>';
    ---
    > $recordSet=&$conn->Execute('select
    glaccount.name,glaccount.description,gltransaction'.$userid.'.amount,gltransaction'.$userid.'.voucherid,gltransaction'.$userid.'.glaccountid
    from gltransaction'.$userid.', glaccount where
    gltransaction'.$userid.'.glaccountid=glaccount.id');
    > if ($recordSet&&!$recordSet->EOF)
    echo '<br><br><table
    border="1"><tr><th>Account</th><th>Account
    Description</th><th>Amount</th><th>Options</Th</tr>';
    80c85
    < echo
    '<tr><td>'.$recordSet->fields[0].'</td><td>'.$recordSet->fields[1].'</td><td>'.checkdec($recordSet->fields[2],PREFERRED_DECIMAL_PLACES).'</td></tr>';
    ---
    > echo
    '<tr><td>'.$recordSet->fields[0].'</td><td>'.$recordSet->fields[1].'</td><td>'.checkdec($recordSet->fields[2],PREFERRED_DECIMAL_PLACES).'</td><td><a
    href="gljouradd.php?voucher='.$voucher.'&glaccountid='.$recordSet->fields[4].'&voucherid='.$recordSet->fields[3].'&amount='.checkdec($recordSet->fields[2],PREFERRED_DECIMAL_PLACES).'&delete=1">Delete</a></td></tr>';

     
  • Chan Min Wai

    Chan Min Wai - 2003-02-21
    • status: open --> closed
     

Log in to post a comment.