دریافت لیست
متد | endpoint |
---|---|
Get | factors/ |
Response
"warehouses": [
{
"id": 614,
"title": "فاکتور فروش یوسفی (پشتیبان)",
"accountingCode": "80034",
"date": "1401/07/17",
"dueDate": "1401/07/23",
"priceUnit": null,
"transferPrice": null,
"status": "تایید شده",
"reference": null,
"description": null,
"type": "sale",
"currency_exchange": 1,
"version": 2,
"createdAt": "2022-10-16T11:46:28.000Z",
"updatedAt": "2022-10-16T11:47:21.000Z",
"deletedAt": null,
"BusinessId": 12,
"PersonId": 8,
"CurrencyId": 1,
"ProjectId": null,
"SellerId": null,
"Factor_Items": [
{
"id": 1185,
"unit": "عدد",
"quantity": 1,
"price": 600000,
"discount": 0,
"tax": 0,
"description": "",
"buyPrice": 0,
"version": 2,
"createdAt": "2022-10-16T11:47:21.000Z",
"updatedAt": "2022-10-16T11:47:21.000Z",
"deletedAt": null,
"ProductId": 54,
"FactorId": 614,
"Product": {
"id": 54,
"accountingCode": "0008",
"title": "سامسونگ A52",
"isProduct": true,
"code": "9512885",
"barcode": "1329846",
"imageUrl": null,
"sellPrice": 75000000,
"salesDescription": null,
"buyPrice": 72800000,
"buyDescription": null,
"saleTax": null,
"buyTax": null,
"active": true,
"unit": "عدد",
"subUnit": null,
"conversionRatio": 1,
"is_public": false,
"version": 1,
"createdAt": "2021-12-05T07:49:58.000Z",
"updatedAt": "2021-12-06T10:37:03.000Z",
"deletedAt": null,
"BusinessId": 12,
"CategoryId": 16
},
"totalOneProduct": 600000
},
{
"id": 1186,
"unit": "عدد",
"quantity": 1,
"price": 600000,
"discount": 0,
"tax": 0,
"description": "",
"buyPrice": 0,
"version": 2,
"createdAt": "2022-10-16T11:47:21.000Z",
"updatedAt": "2022-10-16T11:47:21.000Z",
"deletedAt": null,
"ProductId": 54,
"FactorId": 614,
"Product": {
"id": 54,
"accountingCode": "0008",
"title": "سامسونگ A52",
"isProduct": true,
"code": "9512885",
"barcode": "1329846",
"imageUrl": null,
"sellPrice": 75000000,
"salesDescription": null,
"buyPrice": 72800000,
"buyDescription": null,
"saleTax": null,
"buyTax": null,
"active": true,
"unit": "عدد",
"subUnit": null,
"conversionRatio": 1,
"is_public": false,
"version": 1,
"createdAt": "2021-12-05T07:49:58.000Z",
"updatedAt": "2021-12-06T10:37:03.000Z",
"deletedAt": null,
"BusinessId": 12,
"CategoryId": 16
},
"totalOneProduct": 600000
}
],
"Person": {
"id": 8,
"nickName": "یوسفی (پشتیبان)",
"firstName": "یوسفی",
"lastName": "حسین",
"title": "",
"company": "",
"avatar": null,
"accountingCode": "0002",
"description": null,
"active": true,
"balance": -4795140000,
"personType": "customer",
"version": 1,
"createdAt": "2021-10-10T10:22:08.000Z",
"updatedAt": "2022-10-17T08:35:57.000Z",
"deletedAt": null,
"BusinessId": 12,
"PersonTypeId": 1
},
"Project": null,
"Seller": null,
"Transaction": null,
"Currency": {
"id": 1,
"en_title": "ریال",
"fa_title": "ریال",
"version": 2,
"createdAt": "2022-07-16T06:45:18.000Z",
"updatedAt": "2022-07-16T06:45:18.000Z",
"deletedAt": null
},
"billStatus": "-",
"total": 1200000,
"totalTax": 0,
"totalDiscount": 0,
"totalQuantity": 2,
"totalPrice": 1200000,
"totalTransaction": 0,
"remaining": 1200000,
"personName": "یوسفی (پشتیبان)",
"sellersName": null
}
...
]
دریافت از طریق Id
متد | endpoint |
---|---|
Get | factors/{id} |
Request
عنوان پارامتر | نوع پارامتر | نوع داده | توضیحات |
---|---|---|---|
id | اجباری | Integer | Id فاکتور |
Response
{
"id": 614,
"title": "فاکتور فروش یوسفی (پشتیبان)",
"accountingCode": "80034",
"date": "1401/07/17",
"dueDate": "1401/07/23",
"priceUnit": null,
"transferPrice": null,
"status": "تایید شده",
"reference": null,
"description": null,
"type": "sale",
"currency_exchange": 1,
"version": 2,
"createdAt": "2022-10-16T11:46:28.000Z",
"updatedAt": "2022-10-16T11:47:21.000Z",
"deletedAt": null,
"BusinessId": 12,
"PersonId": 8,
"CurrencyId": 1,
"ProjectId": null,
"SellerId": null,
"Factor_Items": [
{
"id": 1185,
"unit": "عدد",
"quantity": 1,
"price": 600000,
"discount": 0,
"tax": 0,
"description": "",
"buyPrice": 0,
"version": 2,
"createdAt": "2022-10-16T11:47:21.000Z",
"updatedAt": "2022-10-16T11:47:21.000Z",
"deletedAt": null,
"ProductId": 54,
"FactorId": 614,
"Product": {
"id": 54,
"accountingCode": "0008",
"title": "سامسونگ A52",
"isProduct": true,
"code": "9512885",
"barcode": "1329846",
"imageUrl": null,
"sellPrice": 75000000,
"salesDescription": null,
"buyPrice": 72800000,
"buyDescription": null,
"saleTax": null,
"buyTax": null,
"active": true,
"unit": "عدد",
"subUnit": null,
"conversionRatio": 1,
"is_public": false,
"version": 1,
"createdAt": "2021-12-05T07:49:58.000Z",
"updatedAt": "2021-12-06T10:37:03.000Z",
"deletedAt": null,
"BusinessId": 12,
"CategoryId": 16
},
"totalOneProduct": 600000
},
{
"id": 1186,
"unit": "عدد",
"quantity": 1,
"price": 600000,
"discount": 0,
"tax": 0,
"description": "",
"buyPrice": 0,
"version": 2,
"createdAt": "2022-10-16T11:47:21.000Z",
"updatedAt": "2022-10-16T11:47:21.000Z",
"deletedAt": null,
"ProductId": 54,
"FactorId": 614,
"Product": {
"id": 54,
"accountingCode": "0008",
"title": "سامسونگ A52",
"isProduct": true,
"code": "9512885",
"barcode": "1329846",
"imageUrl": null,
"sellPrice": 75000000,
"salesDescription": null,
"buyPrice": 72800000,
"buyDescription": null,
"saleTax": null,
"buyTax": null,
"active": true,
"unit": "عدد",
"subUnit": null,
"conversionRatio": 1,
"is_public": false,
"version": 1,
"createdAt": "2021-12-05T07:49:58.000Z",
"updatedAt": "2021-12-06T10:37:03.000Z",
"deletedAt": null,
"BusinessId": 12,
"CategoryId": 16
},
"totalOneProduct": 600000
}
],
"Person": {
"id": 8,
"nickName": "یوسفی (پشتیبان)",
"firstName": "یوسفی",
"lastName": "حسین",
"title": "",
"company": "",
"avatar": null,
"accountingCode": "0002",
"description": null,
"active": true,
"balance": -4795140000,
"personType": "customer",
"version": 1,
"createdAt": "2021-10-10T10:22:08.000Z",
"updatedAt": "2022-10-17T08:35:57.000Z",
"deletedAt": null,
"BusinessId": 12,
"PersonTypeId": 1
},
"Project": null,
"Transaction": null,
"Currency": {
"id": 1,
"en_title": "ریال",
"fa_title": "ریال",
"version": 2,
"createdAt": "2022-07-16T06:45:18.000Z",
"updatedAt": "2022-07-16T06:45:18.000Z",
"deletedAt": null
},
"total": 1200000,
"totalTax": 0,
"totalDiscount": 0,
"totalQuantity": 2,
"totalPrice": 1200000,
"totalTransaction": 0,
"remaining": 1200000
}
ذخیره
متد | endpoint |
---|---|
Post | factors/ |
Request
عنوان پارامتر | نوع پارامتر | نوع داده | توضیحات |
---|---|---|---|
accountingCode | اختیاری | String | کد شخص در صورتی که کد شخص را وارد نکنید، شخص جدید ذخیره می شود. در صورتی که کد وارد شود و موجود باشد، اطلاعات ویرایش می شود.در صورتی که کد وارد شود و موجود نباشد، شخص با آن کد ذخیره خواهد شد. کد باید به صورت رشته ای از اعداد شد |
nickName | اجباری | String | نام مستعار |
isLegal | اختیاری | String | |
firstName | اختیاری | String | نام |
lastName | اختیاری | String | نام خانوادگی |
active | اختیاری | Boolean | وضعیت فعال یا غیر فعال کاربر |
personType | اجباری | Enum(customer,personnel,seller,provider) | نوع شخص که فقط یکی از موارد (customer,personnel,seller,provider) می تواند باشد |
personTypeId | اختیاری | Integer | دسته بندی شخص |
financialCredit | اختیاری | Integer | اعتبار مالی |
tax | اختیاری | Integer | مالیات |
description | اختیاری | String | توضیحات |
country | اختیاری | String | کشور |
state | اختیاری | String | استان |
city | اختیاری | String | شهر |
postalCode | اختیاری | String | |
address | اختیاری | String | |
phone | اختیاری | String | |
mobile | اختیاری | String | |
اختیاری | String | ||
website | اختیاری | String | |
bankName | اختیاری | String | |
bankAccountNumber | اختیاری | String | |
bankCardNumber | اختیاری | String | |
bankShaba | اختیاری | String | |
jobPosition | اختیاری | String | |
salary | اختیاری | String | |
contractStart | اختیاری | String | |
contractEnd | اختیاری | String | |
contractDescription | اختیاری | String | |
commissionInput | اختیاری | String |
مثال
{
"main": {
"accountingCode": "010",
"nickName": "ذکتر پارسا",
"firstName": "محمود",
"lastName": "پارسا",
"title": "دکتر پارسا",
"company": null,
"description": "مشتری اینترنت پرسرعت",
"active": true,
"personType": "customer",
"personTypeId": 1
},
"others": [
{"financialCredit": "500000"},
{"economicCode": "12345"},
{"registerationNumber": "12345678"},
{"postalCode": "1234567890"},
{"country": "ایران"},
{"state": "تهران"},
{"city": "تهران"},
{"address": "تهران_میدان ولیعصر"},
{"phone": "02112345678"},
{"mobile": "09123456789"},
{"email": "personEmail@gmail.com"},
{"website": "person.web"},
{"bankName": "ملی"},
{"bankAccountNumber": "0012345678"},
{"bankCardNumber": "1234123412341234"},
{"bankShaba": "12341234123412341234"}
]
}
Response
"warehouse": {
"id": 1,
"accountingCode": "0001",
"title":"انبار اصلی",
"warehouseKeeper": "علی حسینی",
"phone": "0211111111",
"address": "کیلومتر 15 جاده مخصوص",
"active": true,
"BusinessId": 87,
"updatedAt": "2022-10-01 07:26:02",
"createdAt": "2022-10-01 07:26:02"
}
ویرایش
متد | endpoint |
---|---|
Put | factors/{id} |
Request
عنوان پارامتر | نوع پارامتر | نوع داده | توضیحات |
---|---|---|---|
id | اجباری | Integer | Id فاکتور |
Response
"warehouse": {
"id": 1,
"accountingCode": "0001",
"title":"انبار اصلی",
"warehouseKeeper": "علی حسینی",
"phone": "0211111111",
"address": "کیلومتر 15 جاده مخصوص",
"active": true,
"BusinessId": 87,
"updatedAt": "2022-10-01 07:26:02",
"createdAt": "2022-10-01 07:26:02"
}
حذف
متد | endpoint |
---|---|
Delete | factors/{id} |
Request
عنوان پارامتر | نوع پارامتر | نوع داده | توضیحات |
---|---|---|---|
id | اجباری | Integer | Id فاکتور |
Response
{
"message": "فاکتور انتخاب شده با موفقیت حذف شد"
}