erpnext-queue-client 2.9.7 → 2.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1127,4 +1127,257 @@ export declare class ERPNextSalesInvoice extends ERPNextDoctypeSubmittableResour
|
|
|
1127
1127
|
update_auto_repeat_reference?: string | null | undefined;
|
|
1128
1128
|
inter_company_invoice_reference?: string | null | undefined;
|
|
1129
1129
|
}>;
|
|
1130
|
+
createReturnInvoiceDraftFromSalesInvoice(salesInvoiceName: string): Promise<{
|
|
1131
|
+
company: string;
|
|
1132
|
+
customer: string;
|
|
1133
|
+
posting_date: string;
|
|
1134
|
+
currency: string;
|
|
1135
|
+
items: {
|
|
1136
|
+
item_code: string;
|
|
1137
|
+
qty: number;
|
|
1138
|
+
rate: number;
|
|
1139
|
+
uom: string;
|
|
1140
|
+
description?: string | null | undefined;
|
|
1141
|
+
brand?: string | null | undefined;
|
|
1142
|
+
image?: string | null | undefined;
|
|
1143
|
+
item_name?: string | undefined;
|
|
1144
|
+
item_tax_template?: string | null | undefined;
|
|
1145
|
+
amount?: number | null | undefined;
|
|
1146
|
+
base_rate?: number | null | undefined;
|
|
1147
|
+
base_amount?: number | null | undefined;
|
|
1148
|
+
net_rate?: number | null | undefined;
|
|
1149
|
+
net_amount?: number | null | undefined;
|
|
1150
|
+
base_net_rate?: number | null | undefined;
|
|
1151
|
+
base_net_amount?: number | null | undefined;
|
|
1152
|
+
delivered_by_supplier?: 0 | 1 | undefined;
|
|
1153
|
+
weight_per_unit?: number | null | undefined;
|
|
1154
|
+
total_weight?: number | null | undefined;
|
|
1155
|
+
weight_uom?: string | null | undefined;
|
|
1156
|
+
sales_order?: string | null | undefined;
|
|
1157
|
+
so_detail?: string | null | undefined;
|
|
1158
|
+
sales_invoice_item?: string | null | undefined;
|
|
1159
|
+
delivery_note?: string | null | undefined;
|
|
1160
|
+
dn_detail?: string | null | undefined;
|
|
1161
|
+
cost_center?: string | null | undefined;
|
|
1162
|
+
project?: string | null | undefined;
|
|
1163
|
+
barcode?: string | null | undefined;
|
|
1164
|
+
customer_item_code?: string | null | undefined;
|
|
1165
|
+
item_group?: string | null | undefined;
|
|
1166
|
+
stock_uom?: string | null | undefined;
|
|
1167
|
+
conversion_factor?: number | null | undefined;
|
|
1168
|
+
stock_qty?: number | null | undefined;
|
|
1169
|
+
price_list_rate?: number | null | undefined;
|
|
1170
|
+
base_price_list_rate?: number | null | undefined;
|
|
1171
|
+
margin_type?: "" | "Percentage" | "Amount" | null | undefined;
|
|
1172
|
+
margin_rate_or_amount?: number | null | undefined;
|
|
1173
|
+
rate_with_margin?: number | null | undefined;
|
|
1174
|
+
discount_percentage?: number | null | undefined;
|
|
1175
|
+
discount_amount?: number | null | undefined;
|
|
1176
|
+
base_rate_with_margin?: number | null | undefined;
|
|
1177
|
+
pricing_rules?: string | null | undefined;
|
|
1178
|
+
stock_uom_rate?: number | null | undefined;
|
|
1179
|
+
is_free_item?: 0 | 1 | undefined;
|
|
1180
|
+
grant_commission?: 0 | 1 | undefined;
|
|
1181
|
+
incoming_rate?: number | null | undefined;
|
|
1182
|
+
warehouse?: string | null | undefined;
|
|
1183
|
+
target_warehouse?: string | null | undefined;
|
|
1184
|
+
quality_inspection?: string | null | undefined;
|
|
1185
|
+
batch_no?: string | null | undefined;
|
|
1186
|
+
serial_no?: string | null | undefined;
|
|
1187
|
+
actual_batch_qty?: number | null | undefined;
|
|
1188
|
+
actual_qty?: number | null | undefined;
|
|
1189
|
+
item_tax_rate?: string | null | undefined;
|
|
1190
|
+
expense_account?: string | null | undefined;
|
|
1191
|
+
allow_zero_valuation_rate?: 0 | 1 | undefined;
|
|
1192
|
+
page_break?: 0 | 1 | undefined;
|
|
1193
|
+
is_fixed_asset?: 0 | 1 | undefined;
|
|
1194
|
+
enable_deferred_revenue?: 0 | 1 | undefined;
|
|
1195
|
+
purchase_order?: string | null | undefined;
|
|
1196
|
+
purchase_order_item?: string | null | undefined;
|
|
1197
|
+
has_item_scanned?: 0 | 1 | undefined;
|
|
1198
|
+
delivered_qty?: number | null | undefined;
|
|
1199
|
+
income_account?: string | undefined;
|
|
1200
|
+
discount_account?: string | null | undefined;
|
|
1201
|
+
deferred_revenue_account?: string | null | undefined;
|
|
1202
|
+
service_start_date?: string | null | undefined;
|
|
1203
|
+
service_stop_date?: string | null | undefined;
|
|
1204
|
+
service_end_date?: string | null | undefined;
|
|
1205
|
+
asset?: string | null | undefined;
|
|
1206
|
+
finance_book?: string | null | undefined;
|
|
1207
|
+
use_serial_batch_fields?: 0 | 1 | undefined;
|
|
1208
|
+
serial_and_batch_bundle?: string | null | undefined;
|
|
1209
|
+
}[];
|
|
1210
|
+
selling_price_list: string;
|
|
1211
|
+
debit_to: string;
|
|
1212
|
+
status?: "Internal Transfer" | "Draft" | "Return" | "Credit Note Issued" | "Submitted" | "Paid" | "Partly Paid" | "Unpaid" | "Unpaid and Discounted" | "Partly Paid and Discounted" | "Overdue and Discounted" | "Overdue" | "Cancelled" | undefined;
|
|
1213
|
+
docstatus?: number | undefined;
|
|
1214
|
+
amended_from?: string | null | undefined;
|
|
1215
|
+
tax_category?: string | null | undefined;
|
|
1216
|
+
naming_series?: "INV-.#" | "INV-.#-GS" | undefined;
|
|
1217
|
+
language?: string | null | undefined;
|
|
1218
|
+
posting_time?: string | null | undefined;
|
|
1219
|
+
set_posting_time?: 0 | 1 | undefined;
|
|
1220
|
+
company_tax_id?: string | null | undefined;
|
|
1221
|
+
conversion_rate?: number | undefined;
|
|
1222
|
+
total_qty?: number | null | undefined;
|
|
1223
|
+
total_net_weight?: number | null | undefined;
|
|
1224
|
+
base_total?: number | null | undefined;
|
|
1225
|
+
base_net_total?: number | null | undefined;
|
|
1226
|
+
total?: number | null | undefined;
|
|
1227
|
+
net_total?: number | null | undefined;
|
|
1228
|
+
dispatch_address_name?: string | null | undefined;
|
|
1229
|
+
dispatch_address?: string | null | undefined;
|
|
1230
|
+
tax_id?: string | null | undefined;
|
|
1231
|
+
cost_center?: string | null | undefined;
|
|
1232
|
+
project?: string | null | undefined;
|
|
1233
|
+
discount_amount?: number | null | undefined;
|
|
1234
|
+
pricing_rules?: any[] | null | undefined;
|
|
1235
|
+
title?: string | null | undefined;
|
|
1236
|
+
customer_name?: string | null | undefined;
|
|
1237
|
+
is_return?: 0 | 1 | undefined;
|
|
1238
|
+
return_against?: string | null | undefined;
|
|
1239
|
+
po_no?: string | null | undefined;
|
|
1240
|
+
po_date?: string | null | undefined;
|
|
1241
|
+
shipping_address_name?: string | null | undefined;
|
|
1242
|
+
shipping_address?: string | null | undefined;
|
|
1243
|
+
contact_person?: string | null | undefined;
|
|
1244
|
+
contact_display?: string | null | undefined;
|
|
1245
|
+
contact_mobile?: string | null | undefined;
|
|
1246
|
+
contact_email?: string | null | undefined;
|
|
1247
|
+
customer_address?: string | null | undefined;
|
|
1248
|
+
address_display?: string | null | undefined;
|
|
1249
|
+
company_address?: string | null | undefined;
|
|
1250
|
+
company_address_display?: string | null | undefined;
|
|
1251
|
+
price_list_currency?: string | null | undefined;
|
|
1252
|
+
plc_conversion_rate?: number | undefined;
|
|
1253
|
+
ignore_pricing_rule?: 0 | 1 | undefined;
|
|
1254
|
+
set_warehouse?: string | null | undefined;
|
|
1255
|
+
set_target_warehouse?: string | null | undefined;
|
|
1256
|
+
scan_barcode?: string | null | undefined;
|
|
1257
|
+
shipping_rule?: string | null | undefined;
|
|
1258
|
+
incoterm?: string | null | undefined;
|
|
1259
|
+
custom_shipping_cost?: number | null | undefined;
|
|
1260
|
+
custom_tax_included_in_shipping_cost?: 0 | 1 | undefined;
|
|
1261
|
+
taxes_and_charges?: string | null | undefined;
|
|
1262
|
+
other_charges_calculation?: string | null | undefined;
|
|
1263
|
+
base_total_taxes_and_charges?: number | null | undefined;
|
|
1264
|
+
total_taxes_and_charges?: number | null | undefined;
|
|
1265
|
+
apply_discount_on?: "" | "Grand Total" | "Net Total" | undefined;
|
|
1266
|
+
base_discount_amount?: number | null | undefined;
|
|
1267
|
+
additional_discount_percentage?: number | null | undefined;
|
|
1268
|
+
base_grand_total?: number | null | undefined;
|
|
1269
|
+
base_rounding_adjustment?: number | null | undefined;
|
|
1270
|
+
base_rounded_total?: number | null | undefined;
|
|
1271
|
+
base_in_words?: string | null | undefined;
|
|
1272
|
+
grand_total?: number | null | undefined;
|
|
1273
|
+
rounding_adjustment?: number | null | undefined;
|
|
1274
|
+
rounded_total?: number | null | undefined;
|
|
1275
|
+
in_words?: string | null | undefined;
|
|
1276
|
+
disable_rounded_total?: 0 | 1 | undefined;
|
|
1277
|
+
tc_name?: string | null | undefined;
|
|
1278
|
+
terms?: string | null | undefined;
|
|
1279
|
+
campaign?: string | null | undefined;
|
|
1280
|
+
source?: string | null | undefined;
|
|
1281
|
+
is_internal_customer?: 0 | 1 | undefined;
|
|
1282
|
+
represents_company?: string | null | undefined;
|
|
1283
|
+
customer_group?: string | null | undefined;
|
|
1284
|
+
territory?: string | null | undefined;
|
|
1285
|
+
letter_head?: string | null | undefined;
|
|
1286
|
+
select_print_heading?: string | null | undefined;
|
|
1287
|
+
group_same_items?: 0 | 1 | undefined;
|
|
1288
|
+
auto_repeat?: string | null | undefined;
|
|
1289
|
+
sales_partner?: string | null | undefined;
|
|
1290
|
+
amount_eligible_for_commission?: number | null | undefined;
|
|
1291
|
+
commission_rate?: number | null | undefined;
|
|
1292
|
+
total_commission?: number | null | undefined;
|
|
1293
|
+
packed_items?: any[] | null | undefined;
|
|
1294
|
+
taxes?: {
|
|
1295
|
+
charge_type: "Actual" | "On Net Total" | "On Previous Row Amount" | "On Previous Row Total" | "On Item Quantity";
|
|
1296
|
+
account_head: string;
|
|
1297
|
+
included_in_print_rate: 0 | 1;
|
|
1298
|
+
description?: string | undefined;
|
|
1299
|
+
rate?: number | undefined;
|
|
1300
|
+
base_total?: number | undefined;
|
|
1301
|
+
total?: number | undefined;
|
|
1302
|
+
cost_center?: string | undefined;
|
|
1303
|
+
project?: string | undefined;
|
|
1304
|
+
account_currency?: string | undefined;
|
|
1305
|
+
base_tax_amount?: number | undefined;
|
|
1306
|
+
tax_amount?: number | undefined;
|
|
1307
|
+
tax_amount_after_discount_amount?: number | undefined;
|
|
1308
|
+
}[] | null | undefined;
|
|
1309
|
+
sales_team?: any[] | null | undefined;
|
|
1310
|
+
outstanding_amount?: number | null | undefined;
|
|
1311
|
+
paid_amount?: number | null | undefined;
|
|
1312
|
+
base_paid_amount?: number | null | undefined;
|
|
1313
|
+
remarks?: string | null | undefined;
|
|
1314
|
+
due_date?: string | null | undefined;
|
|
1315
|
+
update_stock?: 0 | 1 | undefined;
|
|
1316
|
+
total_advance?: number | null | undefined;
|
|
1317
|
+
write_off_amount?: number | null | undefined;
|
|
1318
|
+
base_write_off_amount?: number | null | undefined;
|
|
1319
|
+
allocate_advances_automatically?: 0 | 1 | undefined;
|
|
1320
|
+
payment_terms_template?: string | null | undefined;
|
|
1321
|
+
ignore_default_payment_terms_template?: 0 | 1 | undefined;
|
|
1322
|
+
party_account_currency?: string | null | undefined;
|
|
1323
|
+
is_opening?: "No" | "Yes" | undefined;
|
|
1324
|
+
advances?: {
|
|
1325
|
+
doctype: "Sales Invoice Advance";
|
|
1326
|
+
reference_name: string;
|
|
1327
|
+
reference_type: string;
|
|
1328
|
+
advance_amount: number;
|
|
1329
|
+
allocated_amount?: number | null | undefined;
|
|
1330
|
+
remarks?: string | null | undefined;
|
|
1331
|
+
reference_row?: string | null | undefined;
|
|
1332
|
+
}[] | null | undefined;
|
|
1333
|
+
payment_schedule?: any[] | null | undefined;
|
|
1334
|
+
custom_invoice_no?: string | null | undefined;
|
|
1335
|
+
is_pos?: 0 | 1 | undefined;
|
|
1336
|
+
pos_profile?: string | null | undefined;
|
|
1337
|
+
is_debit_note?: 0 | 1 | undefined;
|
|
1338
|
+
update_outstanding_for_self?: 0 | 1 | undefined;
|
|
1339
|
+
update_billed_amount_in_sales_order?: 0 | 1 | undefined;
|
|
1340
|
+
update_billed_amount_in_delivery_note?: 0 | 1 | undefined;
|
|
1341
|
+
is_consolidated?: 0 | 1 | undefined;
|
|
1342
|
+
named_place?: string | null | undefined;
|
|
1343
|
+
use_company_roundoff_cost_center?: 0 | 1 | undefined;
|
|
1344
|
+
coupon_code?: string | null | undefined;
|
|
1345
|
+
is_cash_or_non_trade_discount?: 0 | 1 | undefined;
|
|
1346
|
+
additional_discount_account?: string | null | undefined;
|
|
1347
|
+
timesheets?: any[] | null | undefined;
|
|
1348
|
+
total_billing_hours?: number | null | undefined;
|
|
1349
|
+
total_billing_amount?: number | null | undefined;
|
|
1350
|
+
cash_bank_account?: string | null | undefined;
|
|
1351
|
+
payments?: {
|
|
1352
|
+
amount: number;
|
|
1353
|
+
mode_of_payment: string;
|
|
1354
|
+
account?: string | null | undefined;
|
|
1355
|
+
base_amount?: number | null | undefined;
|
|
1356
|
+
reference_no?: string | null | undefined;
|
|
1357
|
+
clearance_date?: string | null | undefined;
|
|
1358
|
+
}[] | null | undefined;
|
|
1359
|
+
base_change_amount?: number | null | undefined;
|
|
1360
|
+
change_amount?: number | null | undefined;
|
|
1361
|
+
account_for_change_amount?: string | null | undefined;
|
|
1362
|
+
only_include_allocated_payments?: 0 | 1 | undefined;
|
|
1363
|
+
write_off_outstanding_amount_automatically?: 0 | 1 | undefined;
|
|
1364
|
+
write_off_account?: string | null | undefined;
|
|
1365
|
+
write_off_cost_center?: string | null | undefined;
|
|
1366
|
+
redeem_loyalty_points?: 0 | 1 | undefined;
|
|
1367
|
+
loyalty_points?: number | null | undefined;
|
|
1368
|
+
loyalty_amount?: number | null | undefined;
|
|
1369
|
+
loyalty_program?: string | null | undefined;
|
|
1370
|
+
dont_create_loyalty_points?: 0 | 1 | undefined;
|
|
1371
|
+
loyalty_redemption_account?: string | null | undefined;
|
|
1372
|
+
loyalty_redemption_cost_center?: string | null | undefined;
|
|
1373
|
+
unrealized_profit_loss_account?: string | null | undefined;
|
|
1374
|
+
against_income_account?: string | null | undefined;
|
|
1375
|
+
subscription?: string | null | undefined;
|
|
1376
|
+
from_date?: string | null | undefined;
|
|
1377
|
+
to_date?: string | null | undefined;
|
|
1378
|
+
update_auto_repeat_reference?: string | null | undefined;
|
|
1379
|
+
is_discounted?: 0 | 1 | undefined;
|
|
1380
|
+
inter_company_invoice_reference?: string | null | undefined;
|
|
1381
|
+
repost_required?: 0 | 1 | undefined;
|
|
1382
|
+
}>;
|
|
1130
1383
|
}
|
|
@@ -50,5 +50,14 @@ class ERPNextSalesInvoice extends doctypeSubmittableResourceRequest_1.ERPNextDoc
|
|
|
50
50
|
body,
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
+
async createReturnInvoiceDraftFromSalesInvoice(salesInvoiceName) {
|
|
54
|
+
const draft = await this.methodRequest.request({
|
|
55
|
+
methodName: `erpnext.accounts.doctype.sales_invoice.sales_invoice.make_sales_return`,
|
|
56
|
+
requestMethod: "POST",
|
|
57
|
+
responseValidationModel: SalesInvoice_1.SalesInvoiceDraft,
|
|
58
|
+
params: { source_name: salesInvoiceName },
|
|
59
|
+
});
|
|
60
|
+
return draft;
|
|
61
|
+
}
|
|
53
62
|
}
|
|
54
63
|
exports.ERPNextSalesInvoice = ERPNextSalesInvoice;
|