📄 guozhang.php
字号:
<?php
$t_AUTOID=$_GET[AUTOID];
if (empty($t_AUTOID)){$t_AUTOID=0;};
include ("../inc/db.php");
include ("../inc/phpmkrfn.php");
include ("../kuchen/kuchen.php");
include ("../yinfu/yinfu.php");
include ("../casebank/case.php");
$conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
$sSql = "select * from jhdmast where autoid =$t_AUTOID";
$rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
$row = mysql_fetch_array($rs, MYSQL_ASSOC);
$ys_ac=$row[JHM02]; //客户编号
$ys_id=$row[JHMID]; //送货单号
$ys_lx=$row[JHM10]; //结款类型
$ys_ty="JHD"; //送货单
if (phpmkr_num_rows($rs) > 0){
$uSql = "update jhdmast set ";
$uSql .= "JHM11 = '1' ";
$uSql .= " where autoid =$t_AUTOID";
}
$drs = phpmkr_query($uSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $uSql);
$sSql = "select sum(JHD05) as jtotal from jhddelt where JHDID ='$ys_id'";
$rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
$row = mysql_fetch_array($rs, MYSQL_ASSOC);
$ys_num=$row[jtotal]; //金额合计
//echo $ys_lx;
if ($ys_lx=="02"){ // 月结
//新增应付帐款
yinfu_new($ys_ac,$ys_id,$ys_ty,$ys_num);
}
if ($ys_lx=="01"){ // 现金
//新增现金日记帐
$ys_fx = 1; //支出
case_new($ys_ac,$ys_id,$ys_ty,$ys_num,$ys_fx);
}
header("location:list.php");
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -