선택처방 라벨프린트 영역 php code
작성자 정보
- 삼둡 작성
- 작성일
컨텐츠 정보
- 2,630 조회
- 6 댓글
- 목록
본문
javascript:select_label();
행을 체크하고 라벨프린트를 누르면 javascript에 의해
select_label()로 간다
function select_label (); {
var f = document.fcategory;
str = "라벨프린트";
if (!check_confirm(str))
return;
if (!confirm("선택한 항목을 정말 "+str+" 하시겠습니까?\n\n 한번 "+str+"한 >자료는 종이가 아까울 수 있습니다."))
return;
f.action = "./labelprint.selected.php";
f.submit();
}
f를 fcategory로 잡아서
전체 덩어리를 labelprint.selected.php로 갖다 붙여준다.
labelprint.selected.php
include_once("./lib.php");
include_once("./_common.php");
erp_connect();
rx_level(5);
$new_date=date("Y-m-d", $newdate);
$table="*****"; //테이블 이름
$tmp_array = array();
$tmp_array = $_POST[chk_serial];
for ($xi=count($chk_serial)-1; $xi>=0; $xi--)
{
$query = "select * from $table where serial={$chk_serial[$xi]};";
$rs = mysql_query($query);
$array = mysql_fetch_array($rs) ;
confirm_make_herb.php
<div>
<a href='/rx/print_delivery.php?serial=<?=$serial;?>'>[[[송장인쇄 우리한방]]]</a>
</div>
serial을 매개변수로 해서 print_delivery.php를 호출해서 송장을 인쇄하는 php를 호출한다.
print_delivery.php
$sql="select lifemaru, address, phone from branch where branch_name = '$branch'";
$rs=sql_q2($sql);
$row=mysql_fetch_array($rs);
$lifemaru_mode=$row[0];
$address=$row[1];
$phone =$row[2];
if ($lifemaru_mode == 2 || $lifemaru_mode == 1)
{
$branch = "생명마루(".$branch.")";
}
else
{
if ($branch=="청담")
{
$branch="청담BS한의원";
}
else
{
$branch = $branch."한의원";
}
}
if (!$array[serial]) { alert ("처방이 유효하지 않습니다"); }
if (!$address and !$lifemaru_mode)
{
$address="안산 단원구 고잔동 540-14 경신프라자 406호.";
}
lifemaru_mode가 1이거나 2인 경우 , 즉 ㅅㅅㅐ생명마루지점인 경우
브랜치 명을 생명마루 지점명으로 하고
아니경우
청담은 청담BS한의원
다른 원외탕전은 **한의원으로
브랜치 이름을 저장해둔다.
주소가 ㅇㅄㅇ 없다면 탕전원 주소로 넣어둔다
$sql = "select * from $tablename where serial=$serial";
$result = mysql_query($sql) or die (mysql_error());
$array=mysql_fetch_array($result);
$branch=$array[branch];
이게 앞에 있었다.
그러니까 일단 해당 처방의 주소 약재등 왠만한건 일단 다 집어왔다
(컴팩트하게좀 하지 ㅜㅜ)
mode참고!!
case 0:
$mode_herb="대기";
break;
case 1:
$mode_herb="확인";
break;
case 2:
$mode_herb="탕전";
break;
case 3:
$mode_herb="완료~배송중";
case 4:
$mode_herb="약재까지취소";
case 5:
$mode_herb="탕전서비스취소";
!!
관련자료
-
이전
-
다음
삼둡님의 댓글
- 삼둡
- 작성일
$g4[title]="약재리스트출력";
include_once("./lib.php");
include_once("$g4[path]/_head.php");
erp_connect ();
rx_level(2);
삼둡님의 댓글
- 삼둡
- 작성일
$g4[title]="약재리스트출력";
include_once("./lib.php");
include_once("$g4[path]/_head.php");
삼둡님의 댓글
- 삼둡
- 작성일
<a href="javascript:select_delete();"><img src="../skin/board/basic/img/btn_select_delete.gif" align=absmiddle></a>
<br>
<a href="javascript:select_label();">선택처방 라벨프린트</a>
</tr>
삼둡님의 댓글
- 삼둡
- 작성일
삼둡님의 댓글
- 삼둡
- 작성일
$array[pt_name]
</td>
<td width=282>
$array[phone1] <br>
$array[phone2]
</td>
<td>
</td>
</tr>
<tr>
<td colspan=2 height=115>
$array[address]
</td>
<td>
</td>
</tr>
<tr>
<td width=170 height=13>
$branch
</td>
<td colspan=2>
$phone
</td>
</tr>
<tr>
<td width=420 height=30 colspan=2>
$address
</td>
<td style='font-size:11pt;' valign='middle'>
$yy.$mm.$dd
print_delivery.php
삼둡님의 댓글
- 삼둡
- 작성일
$sql="select lifemaru, address, phone from branch where branch_name = '$branch'";
$rs=sql_q2($sql);
$row=mysql_fetch_array($rs);
$lifemaru_mode=$row[0];
$address=$row[1];
$phone =$row[2];
if ($lifemaru_mode == 2 || $lifemaru_mode == 1)
{
$branch = "생명마루(".$branch.")";
}
else
{
if ($branch=="청담")
{
$branch="청담BS한의원";
}
else
{
$branch = $branch."한의원";
}
}
if (!$array[serial]) { alert ("처방이 유효하지 않습니다"); }
if (!$address and !$lifemaru_mode)
{
$address="안산 단원구 고잔동 540-14 경신프라자 406호.";
}