Update: 2026-06-26 17:56:46
This commit is contained in:
@@ -18,6 +18,7 @@ class AuditLogsPage extends StatelessWidget {
|
||||
centerTitle: true,
|
||||
),
|
||||
body: GetBuilder<SecurityV2Controller>(
|
||||
init: SecurityV2Controller(),
|
||||
builder: (ctrl) {
|
||||
if (ctrl.isLoading) {
|
||||
return const Center(
|
||||
|
||||
@@ -10,6 +10,7 @@ import '../../constant/box_name.dart';
|
||||
import '../../constant/info.dart';
|
||||
import '../../controller/functions/encrypt_decrypt.dart';
|
||||
import '../../main.dart';
|
||||
import '../../print.dart';
|
||||
import '../../views/widgets/snackbar.dart';
|
||||
|
||||
class AddInvoicePage extends StatefulWidget {
|
||||
@@ -56,7 +57,13 @@ class _AddInvoicePageState extends State<AddInvoicePage> {
|
||||
final fingerprint = box.read(BoxName.fingerPrint) ?? '';
|
||||
|
||||
final uri = Uri.parse(AppLink.addInvoice);
|
||||
Log.print('--- [INVOICE UPLOAD] ---');
|
||||
Log.print('URL: $uri');
|
||||
Log.print('Fields: invoiceNumber=$invoiceNumber, amount=$amount, name=$itemName, date=$date');
|
||||
Log.print('Has image: ${_imageFile != null}');
|
||||
|
||||
final request = http.MultipartRequest('POST', uri)
|
||||
..fields['driverID'] = '0'
|
||||
..fields['invoiceNumber'] = invoiceNumber
|
||||
..fields['amount'] = amount
|
||||
..fields['name'] = itemName
|
||||
@@ -73,7 +80,10 @@ class _AddInvoicePageState extends State<AddInvoicePage> {
|
||||
}
|
||||
|
||||
final streamed = await request.send();
|
||||
Log.print('Status Code: ${streamed.statusCode}');
|
||||
final respStr = await streamed.stream.bytesToString();
|
||||
Log.print('Response Body: $respStr');
|
||||
Log.print('-------------------');
|
||||
|
||||
Map<String, dynamic> data;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user