⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 acc_xjrjzz.php

📁 自己实现一个实用的商店应用系统
💻 PHP
字号:
<?php
////////////////////////////////////////////////////////
// Author by Shuweich
// Date : 2007.07.27
// 2007.11.16 完成了前端界面的开发
// 建站支持: http://www.shuweich.net
// 作者: Shuweich
// QQ: 1502384
// ICQ: 190492112
// MSN: shuweich@hotmail.com
// E-mail: root@shuweich.net
// E-mail: shuweich@163.com
////////////////////////////////////////////////////////
// 模块管理 by lssppxb
// For 现金日记帐
////////////////////////////////////////////////////////
// 考虑增面HTML头尾结构
$title='现金日记帐';
include_once '../../mainfile.php';
include_once 'head_acc.php';
include_once 'head_inc.php';

$_S_id = $_REQUEST['s_id0'];
echo "<span style='font-size:20px;'>现金日记帐<br />
===================================\n";

## 根据`bybz`字段值定义具体语句    [2]       [3]         [4]    [5]    [6] ## To Debug ##

echo "<form method='post' action='".$_SERVER['PHP_SELF']."?s_id0=".$_REQUEST['s_id0']."' name='seri_prc' >\n";
?>

    <input type='hidden' size='1' value='1' id='jcqk_post' name='jcqk_post' />
      缴存金额:<input type='text' value='' id='jcje' name='jcje' size='19' autocomplete='off' />
      缴款说明:<input type='text' value='缴存款项' id='ca_zy0' name='ca_zy0' size='19' autocomplete='off' />

    <hr width='606' align='left' />

    <div name='m_code' id='m_code' style='position:absolute;top:64px;left:9px;height:20px;width:20px;display:none;'>
    <select id='MySelect' name='MySelect' size='1' onchange='javascript:mbarcode_sel();'></select>
    </div>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type='button' value='取消' onclick='javascript:window.location.href="<?php echo $_SERVER['PHP_SELF'].'?s_id0='.$_REQUEST['s_id0']; ?>";' />&nbsp;&nbsp;
    <input type='submit' name='B01' id='B01' value='确认' />&nbsp;&nbsp;&nbsp;
<?php
  echo "<input type='button' name='B001' value='刷新显示'";
  echo "onclick=\"window.location.href='".$_SERVER['PHP_SELF']."?s_id0=".$_REQUEST['s_id0']."';\" />";
  echo "</form>\n";
  $qu0 = "select s_name from ".$xoopsDB->prefix("market_store")." where store_id='".$_REQUEST['s_id0']."'";
  $store_name=$xoopsDB->fetchrow( $xoopsDB->query($qu0) );
  $que = array();
  $que[0] = "select ca_date,ca_djh,ca_zy,jf,df,jy,jz_user_id from ".$xoopsDB->prefix("market_cash")." where store_id='".$_REQUEST['s_id0']."' order by ca_id,ca_date,ca_djh";
  $title = $store_name[0]."现金日记帐";
  $tabHead = array
  (
  0 =>array('name' =>'记 帐 日 期','attr' =>'','w' =>138,'size' =>14,'sum' =>0,'func' =>'$out=substr($row[0],0,16);'),
  1 =>array('name' =>'单据编号','attr' =>'','w' =>84,'size' =>14,'sum' =>0),
  2 =>array('name' =>'摘要(收支事项)','attr' =>'','w' =>238,'size' =>14,'sum' =>0),
  3 =>array('name' =>'借(收入)方','attr' =>'','w' =>94,'size' =>14,'sum' =>1,'roundec' =>2),
  4 =>array('name' =>'贷(付出)方','attr' =>'','w' =>94,'size' =>14,'sum' =>1,'roundec' =>2),
  5 =>array('name' =>'结存','attr' =>'','w' =>54,'size' =>14,'sum' =>0,'roundec' =>2),
  6 =>array('name' =>'记帐员','attr' =>'','w' =>94,'size' =>14,'sum' =>0)
  );
  $Other='sumres=1';
  include_once 'head_func.php';
  DispData($que,$title,$tabHead,$Other,$_ZY);
  ## echo "数据查询域<hr />\n";

if ( $_REQUEST['jcqk_post'] == '1' ) {
  ## 登记现金日记总帐
  ## 昨日结余
  $que = "select jy from ".$xoopsDB->prefix("market_cash")." where store_id='".$_REQUEST['s_id0']."'";
  $que .=" order by ca_date desc limit 0,1";
  $zrjy = $xoopsDB->fetchrow( $xoopsDB->query($que) );
  ## 今日结余
  $jrjy = $zrjy[0] - $_REQUEST['jcje'];
  $ins = "insert into ".$xoopsDB->prefix("market_cash");
  $ins .=" (ca_id,store_id,ca_date,ca_djh,ca_zy,df,jy,ca_shbz,jz_user_id) values (";
  $ins .="0,'".$_REQUEST['s_id0']."',now(),'jcje-006','".$_REQUEST['ca_zy0']."',";
  $ins .=$_REQUEST['jcje'].",".$jrjy.",'0',".$xoopsUser->getVar("uid").")";
  $ins1 = $xoopsDB->queryF($ins);
  echo "
  <script language='javascript'>
  <!--
	  window.location.href='".$_SERVER['PHP_SELF']."?s_id0=".$_REQUEST['s_id0']."';
  // -->
  </script>
  ";
}

include_once '../../footer.php';
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -