|
|
|
@@ -1,5 +1,6 @@ |
|
|
|
import { eventHnalder } from "@/common/app-template"; |
|
|
|
import { AppID } from "@/common/appids"; |
|
|
|
import { formatDateStr, today } from "@/common/datetime"; |
|
|
|
import { initMenuBox, setHeaderButton } from "@/common/header-button"; |
|
|
|
import { KintoneEvent, 値設定 } from "@/common/kintone-event"; |
|
|
|
import { makeRecordData } from "@/common/rest-api-client"; |
|
|
|
@@ -8,10 +9,12 @@ import { EmailID, sendEmail } from "@/mypage/メール"; |
|
|
|
import { makeReceipt } from "@/mypage/領収証発行"; |
|
|
|
import bulkRequest from "@/rest-api/bulk"; |
|
|
|
import { get定期申込予約 } from "@/rest-api/定期申込予約"; |
|
|
|
import { get顧客マスタ } from "@/rest-api/顧客マスタ"; |
|
|
|
import { 入金予定結果, 入金予定結果フィールド名 } from "@/types/入金予定結果"; |
|
|
|
import { 定期申込予約フィールド名 } from "@/types/定期申込予約"; |
|
|
|
import { 顧客マスタフィールド名 } from "@/types/顧客マスタ"; |
|
|
|
import { KintoneRestAPIClient } from "@kintone/rest-api-client"; |
|
|
|
import { format } from "date-fns"; |
|
|
|
import { addDays, format, setHours } from "date-fns"; |
|
|
|
import Swal from "sweetalert2"; |
|
|
|
|
|
|
|
const client = new KintoneRestAPIClient(); |
|
|
|
@@ -191,6 +194,21 @@ const setData = (event: any, targets: string[]) => { |
|
|
|
.value |
|
|
|
), |
|
|
|
}); |
|
|
|
|
|
|
|
// 口座振替登録催促日時を設定する |
|
|
|
const 口座登録催促日時 = (() => { |
|
|
|
return formatDateStr(setHours(addDays(today(), 5), 9)); |
|
|
|
})(); |
|
|
|
const 顧客 = await get顧客マスタ({ |
|
|
|
顧客コード: Number(record.customer_code.value), |
|
|
|
}); |
|
|
|
bulkRequest.update({ |
|
|
|
app: AppID.顧客マスタ, |
|
|
|
id: 顧客?.$id.value, |
|
|
|
record: makeRecordData({ |
|
|
|
[顧客マスタフィールド名.口座登録催促予定日時]: 口座登録催促日時, |
|
|
|
}), |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
); |
|
|
|
|