From 2f9c2983a9c60bb3c875deaa2264384a55d18221 Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 14 Feb 2026 14:26:49 +0900 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E7=9B=B4=E3=81=97=E3=81=8B=E3=81=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gemi_invoice/fix_build_errors.md | 28 ++++++++++++++++++++++++++++ じぇみエモン専用gemi_invoice用 | 22 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 gemi_invoice/fix_build_errors.md create mode 100644 じぇみエモン専用gemi_invoice用 diff --git a/gemi_invoice/fix_build_errors.md b/gemi_invoice/fix_build_errors.md new file mode 100644 index 0000000..310c5b8 --- /dev/null +++ b/gemi_invoice/fix_build_errors.md @@ -0,0 +1,28 @@ +# 依頼内容 +Flutterプロジェクトのビルドエラーを解消し、顧客マスター管理(GPSソート/電話帳連携)と請求書履歴一覧の機能を完成させてください。 + +# 現状の問題 +1. `CustomerPickerModal` 内で DB の `Customer` 型とアプリ用 `Customer` モデルが衝突し、型エラーが発生している。 +2. `pdf_list_screen.dart` で、DB から顧客情報付きの請求データを取得する `InvoiceWithCustomer` 型や `watchAllInvoices()` メソッドが見つからずエラーになっている。 +3. `invoice_input_screen.dart` で `CustomerPickerModal` を呼び出す際、古い引数 `existingCustomers` を渡しておりエラーになっている。 + +# 実行ステップ +1. **lib/data/database.dart の更新**: + - `Invoices` と `Customers` を結合して取得するための `InvoiceWithCustomer` クラスを定義してください。 + - `AppDatabase` クラスに、最新順でデータを流す `Stream> watchAllInvoices()` メソッドを実装してください。 + - その後、`flutter pub run build_runner build --delete-conflicting-outputs` を実行してコード生成を完了させてください。 + +2. **lib/screens/customer_picker_modal.dart の修正**: + - インポートで `../models/invoice_models.dart` を `app_model` として別名を付け、DBの `Customer` 型と明確に区別してください。 + - GPS座標(latitude/longitude)を使用して、現在地に近い順にリストをソートするロジックを実装してください。 + - 電話帳(flutter_contacts)からの取り込みと、DBへの保存(insertOnConflictUpdate)が正常に動くようにしてください。 + +3. **lib/screens/pdf_list_screen.dart の修正**: + - `database.watchAllInvoices()` を使用して履歴一覧を表示するようにしてください。 + - リストタップ時に、DBのモデルからアプリ用の `Invoice` モデルへ変換して詳細画面へ遷移させてください。 + +4. **lib/screens/invoice_input_screen.dart の修正**: + - `CustomerPickerModal` の呼び出し箇所から、存在しない引数 `existingCustomers` を削除してください。 + +# 完了条件 +`flutter build apk --debug` がエラーなく通り、かつ顧客マスターのGPSソートが機能すること。 \ No newline at end of file diff --git a/じぇみエモン専用gemi_invoice用 b/じぇみエモン専用gemi_invoice用 new file mode 100644 index 0000000..6e41685 --- /dev/null +++ b/じぇみエモン専用gemi_invoice用 @@ -0,0 +1,22 @@ +# Project: 販売アシスト1号 (gemi_invoice) - Status Report + +## 1. 開発の基本方針 +- 言語: 日本語主体(コメントは日英併記) +- 優先事項: AI開発効率の最大化(可読性より機能実装スピード) +- 命名規則: {date}({種別}){顧客名}_{件名}_{金額}円_{hash}.pdf + +## 2. 実装済みコンポーネント +- [lib/models/]: Invoice, Customer, InvoiceItem の基本モデル。 +- [lib/services/pdf_generator.dart]: + - IPAexゴシック埋め込みによる日本語対応。 + - SHA256ハッシュを含む命名規則実装済み。 +- [lib/screens/invoice_detail_page.dart]: + - 編集、保存、PDF生成、即時プレビュー(printing)連動済み。 +- [lib/screens/invoice_input_screen.dart]: + - 新規作成・保存フロー構築済み。 + +## 3. 次のターゲット (README.md 仕様) +- SQLite (drift) による永続化層の構築。 +- GPS連動による顧客自動選出機能。 +- 見積/納品/請求/領収の種別切り替え対応。 +- OCR / Google Lens 連携。