修改采购单生成规则

This commit is contained in:
lewis 2024-12-25 11:38:11 +08:00
parent ed01ef1b9a
commit 77a1969ceb

View File

@ -41,7 +41,11 @@ class PurchaseProductOfferLogic extends BaseLogic
{
Db::startTrans();
try {
$procurementOrder = BeforehandOrder::where('order_type', 7)->where('buyer_id', $params['buyer_id'])->where('is_buying', 0)->where('create_time', '>=', strtotime('-3 days'))->find();
$procurementOrder = BeforehandOrder::where('order_type', 7)
->where('buyer_id', $params['buyer_id'])
->where('is_buying', 0)
->where('create_time', '>=', strtotime('today'))
->find();
if (empty($procurementOrder)) {
$procurementOrder = new BeforehandOrder();
$procurementOrder->order_id = getNewOrderId('CG');