picker-db 3.9.1 → 3.9.3

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.
package/constants.js CHANGED
@@ -47,6 +47,10 @@ module.exports = {
47
47
  INDEX: 5,
48
48
  TEXT: "BILLING_TRANSFER",
49
49
  },
50
+ TERMINAL: {
51
+ INDEX: 6,
52
+ TEXT: "TERMINAL",
53
+ },
50
54
  },
51
55
  BOOKING_TYPES: {
52
56
  PICKUP_AND_DELIVER: {
@@ -88,6 +88,7 @@ module.exports = (connection) => {
88
88
  enum: [
89
89
  PAYMENT_METHODS.CARD.TEXT,
90
90
  PAYMENT_METHODS.CASH.TEXT,
91
+ PAYMENT_METHODS.TERMINAL.TEXT,
91
92
  ],
92
93
  },
93
94
  });
@@ -255,6 +256,7 @@ module.exports = (connection) => {
255
256
  default: null,
256
257
  },
257
258
  driverAccountingType: { type: String },
259
+ driverPickerPoints: { type: String, default: null },
258
260
  // #endregion Driver Info
259
261
  // #region Delivery location Info
260
262
  deliveryCity: {
@@ -342,6 +344,7 @@ module.exports = (connection) => {
342
344
  PAYMENT_METHODS.CASH.TEXT,
343
345
  PAYMENT_METHODS.BILLING_CARD.TEXT,
344
346
  PAYMENT_METHODS.BILLING_TRANSFER.TEXT,
347
+ PAYMENT_METHODS.TERMINAL.TEXT,
345
348
  ],
346
349
  },
347
350
  paymentMethodCode: {
@@ -352,8 +355,16 @@ module.exports = (connection) => {
352
355
  PAYMENT_METHODS.CASH.INDEX,
353
356
  PAYMENT_METHODS.BILLING_CARD.INDEX,
354
357
  PAYMENT_METHODS.BILLING_TRANSFER.INDEX,
358
+ PAYMENT_METHODS.TERMINAL.INDEX,
355
359
  ],
356
360
  },
361
+ billingMethod: {
362
+ type: String,
363
+ },
364
+ subtype: {
365
+ type: String,
366
+ default: "PICKUP_AND_DELIVER",
367
+ },
357
368
  transactionDetails: {
358
369
  itemCharge: {
359
370
  type: connection.base.Schema.ObjectId,
@@ -386,6 +397,7 @@ module.exports = (connection) => {
386
397
  type: String,
387
398
  default: "PENDING",
388
399
  },
400
+ corporateCustomer: { type: connection.base.Schema.ObjectId },
389
401
  refunds: [
390
402
  {
391
403
  amount: { type: Number, min: 0 },
@@ -494,6 +506,8 @@ module.exports = (connection) => {
494
506
  driverPayment: { type: Number, default: 0 },
495
507
  companyPayment: { type: Number, default: 0 },
496
508
  businessPayment: { type: Number, default: 0 },
509
+ businessExtraPayment: { type: Number, default: 0 },
510
+ tax: { type: Number, default: 0, min: 0 },
497
511
  extraPayment: { type: Number, default: 0 },
498
512
  receivedByDriver: { type: Number, default: 0 },
499
513
  receivedByBusiness: { type: Number, default: 0 },
@@ -513,6 +527,31 @@ module.exports = (connection) => {
513
527
  providerFeeNoMarkup: { type: Number, min: 0 },
514
528
  operationBonus: { type: Number, default: 0 },
515
529
  businessDeliveryFee: { type: Number, default: 0 },
530
+ notShowCharge: { type: Number, default: 0 },
531
+ rushHourIncreaseType: {
532
+ type: String,
533
+ },
534
+ rushHourIncreaseCoefficient: {
535
+ type: Number,
536
+ default: 0,
537
+ min: 0,
538
+ },
539
+ rushHourIncrementAmount: {
540
+ type: Number,
541
+ default: 0,
542
+ min: 0,
543
+ },
544
+ rushHourCharge: {
545
+ type: Number,
546
+ default: 0,
547
+ min: 0,
548
+ },
549
+ rainCharge: {
550
+ type: Number,
551
+ min: 0,
552
+ default: 0,
553
+ },
554
+ providerFeeNoMarkup: { type: Number, min: 0 },
516
555
  },
517
556
  pendingAmount: {
518
557
  type: Number,
@@ -597,6 +636,8 @@ module.exports = (connection) => {
597
636
  cancelReasonByDriver: { type: String },
598
637
  cancelReasonByCustomer: { type: String },
599
638
  cancelReasonByServiceProvider: { type: String },
639
+ cancelReasonByBusiness: { type: String },
640
+ cancelReasonByAdmin: { type: String },
600
641
  cancellationDate: { type: Date },
601
642
  maximumCancellationDate: {
602
643
  default: new Date(),
@@ -778,6 +819,49 @@ module.exports = (connection) => {
778
819
  rating: {
779
820
  type: Number
780
821
  },
822
+ isWithHack: { type: Boolean, index: true, sparse: true },
823
+ // REASIGNMENT COUNTERS
824
+ counters: {
825
+ totalReassignments: { type: Number, default: 0 },
826
+ assignManually: { type: Number, default: 0 },
827
+ restartSearch: { type: Number, default: 0 },
828
+ },
829
+ bookingAutoAccepted: {
830
+ type: Boolean,
831
+ default: false,
832
+ },
833
+ pendingToProcess: {
834
+ type: Boolean,
835
+ },
836
+ responsable: {
837
+ type: String,
838
+ },
839
+ searchServiceHandler: {
840
+ type: String,
841
+ },
842
+ sumOrderAndDelivery: {
843
+ type: Boolean,
844
+ },
845
+ firstTimeOrder: {
846
+ type: Boolean,
847
+ },
848
+ issues: [
849
+ {
850
+ key: { type: String },
851
+ name: { type: String },
852
+ details: { type: String },
853
+ },
854
+ ],
855
+ hasIssue: {
856
+ type: Boolean,
857
+ default: false,
858
+ },
859
+ lastResponsableReassign: {
860
+ type: String,
861
+ },
862
+ lastResponsable: {
863
+ type: String,
864
+ },
781
865
  }, { timestamps: true });
782
866
 
783
867
  BookingSchema.pre("save", function (next) {
@@ -84,6 +84,10 @@ module.exports = (connection) => {
84
84
  default: 0,
85
85
  min: 0,
86
86
  },
87
+ paymentMethod: {
88
+ type: String,
89
+ },
90
+ taxPercentage: { type: Number },
87
91
  }, { _id: false });
88
92
 
89
93
  return PricingDetailsSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picker-db",
3
- "version": "3.9.1",
3
+ "version": "3.9.3",
4
4
  "description": "Picker DB services",
5
5
  "main": "index.js",
6
6
  "scripts": {