This commit is contained in:
2025-08-04 20:38:33 +08:00
parent 9d14431ca4
commit 7315404327
2 changed files with 39 additions and 4 deletions

View File

@@ -205,8 +205,8 @@ namespace Pilot_KD_Parino.Sal_Order
{
if (nextOrderId > 0)
{
nextOrderId = IfNeedPush("STK_InStock", fid);
if (nextOrderId == 0)
var tempNextOrderId = IfNeedPush("STK_InStock", fid);
if (tempNextOrderId == 0)
{
tuiName += "采购入库单 ";
result = Invoke("PUR_ReceiveBill", "STK_InStock", nextOrderId.ToString(), "a1ff32276cd9469dad3bf2494366fa4f", ref stockId, "采购入库单");
@@ -1050,7 +1050,7 @@ namespace Pilot_KD_Parino.Sal_Order
if (target == "PUR_ReceiveBill")
{
Sql = $@"/*dialect*/SELECT fid,[FDOCUMENTSTATUS],[FBILLNO] FROM dbo.T_PUR_RECEIVE
WHERE fid in ({fid}) ";
WHERE fid in ({fid}) order by fid desc ";
data = DBServiceHelper.ExecuteDynamicObject(this.Context, Sql, null, null, CommandType.Text, null);
if (data != null && data.Count > 0)
{
@@ -1070,7 +1070,7 @@ namespace Pilot_KD_Parino.Sal_Order
else if (target == "STK_InStock")
{
Sql = $@"/*dialect*/SELECT fid,[FDOCUMENTSTATUS],[FBILLNO] FROM dbo.T_STK_INSTOCK
WHERE fid in ({fid}) ";
WHERE fid in ({fid}) order by fid desc ";
data = DBServiceHelper.ExecuteDynamicObject(this.Context, Sql, null, null, CommandType.Text, null);
if (data != null && data.Count > 0)
{