|
|
@@ -3,10 +3,10 @@
|
|
|
<declare>
|
|
|
v_customer customer%rowtype;
|
|
|
v_employee employee%rowtype;
|
|
|
- v_vendor vendor%rowtype;
|
|
|
v_sale sale%rowtype;
|
|
|
v_sd_id number;
|
|
|
v_pr_code varchar2(64);
|
|
|
+ v_vecode varchar2(64);
|
|
|
</declare>
|
|
|
<body>
|
|
|
<iterator loop="orders" var="order">
|
|
|
@@ -21,10 +21,7 @@
|
|
|
exception when no_data_found then null;
|
|
|
end;
|
|
|
begin
|
|
|
- select * into v_vendor from vendor where ve_name=${order.tervendor};
|
|
|
- exception when no_data_found then
|
|
|
- RAISE_APPLICATION_ERROR(-20010, '供应商['||${order.tervendor}||']不存在');
|
|
|
- end;
|
|
|
+ select ve_code into v_vecode from vendor where ve_name=${order.tervendor};
|
|
|
begin
|
|
|
select * into v_sale from sale where sa_code=${order.salecode};
|
|
|
exception when no_data_found then null;
|
|
|
@@ -58,7 +55,7 @@
|
|
|
v_sale.sa_recorddate := sysdate;
|
|
|
v_sale.sa_statuscode := 'ENTERING';
|
|
|
v_sale.sa_status := '在录入';
|
|
|
- v_sale.sa_vendcode := v_vendor.ve_code;
|
|
|
+ v_sale.sa_vendcode := v_vecode;
|
|
|
v_sale.sa_vendname := ${order.tervendor};
|
|
|
v_sale.sa_a20_user := ${order.madealdate};
|
|
|
v_sale.sa_a19_user := ${order.madealcode};
|