/
datagrids.yml
1024 lines (1007 loc) · 40.2 KB
/
datagrids.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
datagrids:
base-orders-grid:
extended_entity_name: 'Oro\Bundle\OrderBundle\Entity\Order'
options:
entityHint: oro.order.entity_plural_label
entity_pagination: true
source:
type: orm
query:
select:
- DISTINCT order1.id
- order1.identifier
- order1.poNumber
- order1.currency
- order1.subtotalValue as subtotal
- order1.totalValue as total
- order1.shipUntil
- order1.createdAt
- order1.updatedAt
- payment_status.paymentStatus as paymentStatus
- order1.shippingMethod
- order1.shippingMethodType
- order1.totalDiscountsAmount
from:
- { table: 'Oro\Bundle\OrderBundle\Entity\Order', alias: order1 }
join:
left:
- join: 'Oro\Bundle\PaymentBundle\Entity\PaymentStatus'
alias: payment_status
conditionType: WITH
condition: 'payment_status.entityIdentifier = order1.id AND payment_status.entityClass = ''Oro\Bundle\OrderBundle\Entity\Order'''
properties:
id: ~
view_link:
type: url
params: [ id ]
actions:
view:
type: navigate
label: oro.grid.action.view
link: view_link
icon: eye
rowAction: true
frontend-orders-grid:
acl_resource: oro_order_frontend_view
extends: base-orders-grid
update: false
delete: false
options:
frontend: true
source:
query:
select:
- partial order1.{id, shippingAddress}
join:
left:
- { join: order1.shippingAddress, alias: shippingAddress }
columns:
identifier:
label: oro.order.identifier.label
createdAt:
label: oro.ui.created_at
frontend_type: datetime
shippingAddress:
label: oro.order.shipping_address.label
type: twig
template: '@OroOrder/Order/Datagrid/frontendShippingAddress.html.twig'
frontend_type: html
total:
label: oro.order.total.label
frontend_type: multi-currency
type: callback
callable: ['@oro_currency.converter.currency_to_string', 'convert']
multicurrency_config:
currency_field: currency
paymentMethods:
label: oro.order.payment_method.label
type: twig
template: '@OroOrder/Order/Datagrid/paymentMethod.html.twig'
frontend_type: html
paymentStatus:
label: oro.order.payment_status.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/frontendPaymentStatus.html.twig'
#Hidden fields goes next
poNumber:
label: oro.order.po_number.label
renderable: false
shipUntil:
label: oro.order.ship_until.label
frontend_type: date
renderable: false
currency:
label: oro.order.currency.label
renderable: false
subtotal:
label: oro.order.subtotal.label
frontend_type: multi-currency
type: callback
callable: ['@oro_currency.converter.currency_to_string', 'convert']
multicurrency_config:
currency_field: currency
renderable: false
shippingMethod:
label: oro.order.shipping_method.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/frontendShippingMethodFull.html.twig'
renderable: false
updatedAt:
label: oro.ui.updated_at
frontend_type: datetime
renderable: false
sorters:
columns:
poNumber:
data_name: order1.poNumber
shipUntil:
data_name: order1.shipUntil
createdAt:
data_name: order1.createdAt
updatedAt:
data_name: order1.updatedAt
identifier:
data_name: order1.identifier
currency:
data_name: order1.currency
subtotal:
data_name: subtotal
total:
data_name: total
default:
createdAt: DESC
filters:
columns:
poNumber:
type: string
data_name: order1.poNumber
shipUntil:
type: date
data_name: order1.shipUntil
createdAt:
type: datetime
data_name: order1.createdAt
updatedAt:
type: datetime
data_name: order1.updatedAt
paymentStatus:
type: choice
data_name: paymentStatus
options:
field_options:
choices: "@oro_payment.formatter.payment_status_label->getAvailableStatuses"
translatable_options: false
identifier:
type: string
data_name: order1.identifier
currency:
type: choice
data_name: order1.currency
options:
field_options:
choices: "@oro_currency.config.currency->getCurrencies"
translatable_options: false
subtotal:
type: currency
data_name: subtotal
renderable: false
total:
type: currency
data_name: total
properties:
id: ~
view_link:
route: oro_order_frontend_view
view_aria_label:
type: translatable
key: oro.frontend.order.action.view.aria_label
params: [identifier]
start_from_order_aria_label:
type: translatable
key: oro.frontend.order.action.start_from_order.aria_label
params: [identifier]
actions:
view:
ariaLabel: view_aria_label
acl_resource: oro_order_frontend_view
orders-grid:
acl_resource: oro_order_view
extends: base-orders-grid
source:
query:
select:
- CONCAT(order_owner.firstName, ' ', order_owner.lastName) as owner
- CONCAT(customerUser.firstName, ' ', customerUser.lastName) as customerUserName
- customer.name as customerName
- order1.sourceEntityClass
- order1.sourceEntityId
- order1.sourceEntityIdentifier
- order1.totalDiscountsAmount
- SUM(appliedDiscount.amount) as promotionalDiscountsAmount
- internalStatus.name as internalStatusName
- internalStatus.id as internalStatusId
- CASE WHEN IDENTITY(order1.parent) IS NULL THEN 1 ELSE 2 END as orderType
join:
left:
- { join: order1.owner, alias: order_owner }
- { join: order1.customerUser, alias: customerUser }
- { join: order1.customer, alias: customer }
- { join: order1.internal_status, alias: internalStatus }
- { join: order1.appliedPromotions, alias: appliedPromotion }
- { join: appliedPromotion.appliedDiscounts, alias: appliedDiscount }
groupBy: order1.id
hints:
- HINT_TRANSLATABLE
columns:
identifier:
label: oro.order.identifier.label
poNumber:
label: oro.order.po_number.label
orderType:
label: oro.order.order_type.label
frontend_type: select
choices: "@oro_order.provider.order_types->getOrderTypeChoices"
renderable: false
shipUntil:
label: oro.order.ship_until.label
frontend_type: date
currency:
label: oro.order.currency.label
subtotal:
label: oro.order.subtotal.label
frontend_type: multi-currency
type: callback
callable: ['@oro_currency.converter.currency_to_string', 'convert']
multicurrency_config:
currency_field: currency
renderable: false
total:
label: oro.order.total.label
frontend_type: multi-currency
type: callback
callable: ['@oro_currency.converter.currency_to_string', 'convert']
multicurrency_config:
currency_field: currency
promotionalDiscountsAmount:
label: oro.order.order_discount.columns.title
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/promotionalDiscount.html.twig'
renderable: false
customerName:
label: oro.order.customer.label
customerUserName:
label: oro.order.customer_user.label
internalStatusName:
label: oro.order.internal_status.label
owner:
label: oro.order.owner.label
paymentStatus:
label: oro.order.payment_status.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/paymentStatus.html.twig'
paymentMethods:
label: oro.order.payment_method.label
renderable: true
type: twig
template: '@OroOrder/Order/Datagrid/paymentMethodAdmin.html.twig'
frontend_type: html
shippingMethod:
label: oro.order.shipping_method.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/shippingMethodFull.html.twig'
sourceEntityClass:
label: oro.order.source_document.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/sourceDocument.html.twig'
renderable: false
totalDiscountsAmount:
label: oro.order.order_discount.columns.special_discount.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/specialDiscount.html.twig'
createdAt:
label: oro.ui.created_at
frontend_type: datetime
updatedAt:
label: oro.ui.updated_at
frontend_type: datetime
sorters:
columns:
identifier:
data_name: order1.identifier
poNumber:
data_name: order1.poNumber
orderType:
data_name: orderType
shipUntil:
data_name: order1.shipUntil
currency:
data_name: order1.currency
subtotal:
data_name: subtotal
total:
data_name: total
customerName:
data_name: customerName
customerUserName:
data_name: customerUserName
internalStatusName:
data_name: internalStatusName
owner:
data_name: owner
totalDiscountsAmount:
data_name: order1.totalDiscountsAmount
createdAt:
data_name: order1.createdAt
updatedAt:
data_name: order1.updatedAt
default:
createdAt: DESC
filters:
columns:
identifier:
type: string
data_name: order1.identifier
poNumber:
type: string
data_name: order1.poNumber
orderType:
type: single_choice
data_name: orderType
enabled: false
options:
field_options:
choices: "@oro_order.provider.order_types->getOrderTypeChoices"
shipUntil:
type: date
data_name: order1.shipUntil
currency:
type: choice
data_name: order1.currency
options:
field_options:
choices: "@oro_currency.config.currency->getCurrencies"
translatable_options: false
subtotal:
type: currency
data_name: subtotal
renderable: false
total:
type: currency
data_name: total
customerName:
type: string
data_name: customerName
customerUserName:
type: string
data_name: customerUserName
internalStatusName:
type: enum
data_name: internalStatusId
enum_code: order_internal_status
owner:
type: string
data_name: owner
paymentStatus:
type: choice
data_name: paymentStatus
options:
field_options:
choices: "@oro_payment.formatter.payment_status_label->getAvailableStatuses"
translatable_options: false
totalDiscountsAmount:
type: number
data_name: order1.totalDiscountsAmount
options:
data_type: Oro\Bundle\FilterBundle\Form\Type\Filter\NumberFilterType::DATA_DECIMAL
createdAt:
type: datetime
data_name: order1.createdAt
updatedAt:
type: datetime
data_name: order1.updatedAt
properties:
id: ~
view_link:
route: oro_order_view
actions:
view:
acl_resource: oro_order_view
views_list: '@oro_order.datagrid.orders_view_list'
orders-for-context-grid:
acl_resource: oro_order_view
source:
type: orm
query:
select:
- order1.id
- order1.identifier
- order1.poNumber
- CASE WHEN IDENTITY(order1.parent) IS NULL THEN 1 ELSE 2 END as orderType
- CONCAT(order_owner.firstName, ' ', order_owner.lastName) as owner
- customer.name as customerName
- CONCAT(customerUser.firstName, ' ', customerUser.lastName) as customerUserName
from:
- { table: 'Oro\Bundle\OrderBundle\Entity\Order', alias: order1 }
join:
left:
- { join: order1.owner, alias: order_owner }
- { join: order1.customer, alias: customer }
- { join: order1.customerUser, alias: customerUser }
columns:
id:
label: oro.order.id.label
identifier:
label: oro.order.identifier.label
poNumber:
label: oro.order.po_number.label
orderType:
label: oro.order.order_type.label
frontend_type: select
choices: "@oro_order.provider.order_types->getOrderTypeChoices"
owner:
label: oro.order.owner.label
customerName:
label: oro.order.customer.label
customerUserName:
label: oro.order.customer_user.label
sorters:
columns:
identifier:
data_name: order1.identifier
poNumber:
data_name: order1.poNumber
orderType:
data_name: orderType
owner:
data_name: owner
customerName:
data_name: customerName
customerUserName:
data_name: customerUserName
filters:
columns:
identifier:
type: string
data_name: order1.identifier
poNumber:
type: string
data_name: order1.poNumber
orderType:
type: single_choice
data_name: orderType
enabled: false
options:
field_options:
choices: "@oro_order.provider.order_types->getOrderTypeChoices"
owner:
type: string
data_name: owner
customerName:
type: string
data_name: customerName
customerUserName:
type: string
data_name: customerUserName
options:
entityHint: oro.order.entity_plural_label
entity_pagination: true
toolbarOptions:
pageSize:
default_per_page: 10
routerEnabled: false
suborders-grid:
extends: orders-grid
source:
query:
where:
and:
- order1.parent = :order_id
bind_parameters:
- order_id
views_list: ~
embed-orders-grid:
extends: base-orders-grid
acl_resource: oro_order_view
source:
query:
select:
- COUNT(lineItems.id) as lineItemsCount
- CONCAT(order_owner.firstName, ' ', order_owner.lastName) as owner
- internalStatus.name as internalStatusName
- internalStatus.id as internalStatusId
join:
left:
- { join: order1.lineItems, alias: lineItems}
- { join: order1.owner, alias: order_owner }
- { join: order1.internal_status, alias: internalStatus }
groupBy: order1.id
columns:
identifier:
label: oro.order.identifier.label
poNumber:
label: oro.order.po_number.label
renderable: false
shipUntil:
label: oro.order.ship_until.label
frontend_type: date
renderable: false
currency:
label: oro.order.currency.label
subtotal:
label: oro.order.subtotal.label
frontend_type: multi-currency
type: callback
callable: ['@oro_currency.converter.currency_to_string', 'convert']
multicurrency_config:
currency_field: currency
renderable: false
total:
label: oro.order.total.label
frontend_type: multi-currency
type: callback
callable: ['@oro_currency.converter.currency_to_string', 'convert']
multicurrency_config:
currency_field: currency
lineItemsCount:
label: oro.order.line_items_count.label
type: field
frontend_type: integer
internalStatusName:
label: oro.order.internal_status.label
owner:
label: oro.order.owner.label
renderable: false
paymentStatus:
label: oro.order.payment_status.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/paymentStatus.html.twig'
paymentMethods:
label: oro.order.payment_method.label
type: twig
template: '@OroOrder/Order/Datagrid/paymentMethodAdmin.html.twig'
frontend_type: html
shippingMethod:
label: oro.order.shipping_method.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/shippingMethodFull.html.twig'
totalDiscountsAmount:
label: oro.order.order_discount.columns.special_discount.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/specialDiscount.html.twig'
createdAt:
label: oro.ui.created_at
frontend_type: datetime
updatedAt:
label: oro.ui.updated_at
frontend_type: datetime
sorters:
columns:
identifier:
data_name: order1.identifier
subtotal:
data_name: subtotal
total:
data_name: total
lineItemsCount:
data_name: lineItemsCount
poNumber:
data_name: order1.poNumber
shipUntil:
data_name: order1.shipUntil
currency:
data_name: order1.currency
internalStatusName:
data_name: internalStatusName
owner:
data_name: owner
totalDiscountsAmount:
data_name: order1.totalDiscountsAmount
createdAt:
data_name: order1.createdAt
updatedAt:
data_name: order1.updatedAt
default:
createdAt: DESC
filters:
columns:
identifier:
type: string
data_name: order1.identifier
poNumber:
type: string
data_name: order1.poNumber
shipUntil:
type: date
data_name: order1.shipUntil
subtotal:
type: currency
data_name: subtotal
renderable: false
currency:
type: choice
data_name: order1.currency
options:
field_options:
choices: "@oro_currency.config.currency->getCurrencies"
translatable_options: false
total:
type: currency
data_name: total
lineItemsCount:
type: number
data_name: lineItemsCount
filter_by_having: true
internalStatusName:
type: enum
data_name: internalStatusId
enum_code: order_internal_status
owner:
type: string
data_name: owner
paymentStatus:
type: choice
data_name: paymentStatus
options:
field_options:
choices: "@oro_payment.formatter.payment_status_label->getAvailableStatuses"
translatable_options: false
totalDiscountsAmount:
type: number
data_name: order1.totalDiscountsAmount
createdAt:
type: datetime
data_name: order1.createdAt
updatedAt:
type: datetime
data_name: order1.updatedAt
properties:
view_link:
route: oro_order_view
actions:
view:
acl_resource: oro_order_view
customer-user-orders-grid:
extends: embed-orders-grid
source:
query:
join:
left:
- { join: order1.customerUser, alias: customerUser }
where:
and:
- order1.customerUser = :customer_user_id
bind_parameters:
- customer_user_id
customer-orders-grid:
extends: embed-orders-grid
source:
query:
select:
- CONCAT(customerUser.firstName, ' ', customerUser.lastName) as customerUserName
join:
left:
- { join: order1.customer, alias: customer }
- { join: order1.customerUser, alias: customerUser }
where:
and:
- order1.customer = :customer_id
bind_parameters:
- customer_id
columns:
customerUserName:
label: oro.order.customer_user.label
sorters:
columns:
customerUserName:
data_name: customerUserName
filters:
columns:
customerUserName:
type: string
data_name: customerUserName
shopping-list-orders-grid:
extends: embed-orders-grid
source:
query:
select:
- CONCAT(customerUser.firstName, ' ', customerUser.lastName) as customerUserName
- customer.name as customerName
join:
inner:
- { join: order1.customerUser, alias: customerUser }
- { join: order1.customer, alias: customer }
-
join: 'Oro\Bundle\ShoppingListBundle\Entity\ShoppingList'
alias: shopping_list
conditionType: WITH
condition: 'order1.sourceEntityClass = ''Oro\Bundle\ShoppingListBundle\Entity\ShoppingList'' AND order1.sourceEntityId = shopping_list.id AND shopping_list.id = :shopping_list_id'
bind_parameters:
- shopping_list_id
columns:
customerName:
label: oro.order.customer.label
customerUserName:
label: oro.order.customer_user.label
sorters:
columns:
customerName:
data_name: customerName
customerUserName:
data_name: customerUserName
filters:
columns:
customerName:
type: string
data_name: customerName
customerUserName:
type: string
data_name: customerUserName
base-order-line-items-grid:
extended_entity_name: 'Oro\Bundle\OrderBundle\Entity\OrderLineItem'
options:
entityHint: oro.order.orderlineitem.entity_plural_label
source:
type: orm
query:
select:
- partial order_item.{ id, currency, value }
- order_item.productSku
- order_item.freeFormProduct
- order_item.quantity
- order_item.productUnitCode
- order_item.shipBy
- order_item.comment
- order_item.productName
- order_item.productVariantFields
- order_item.shippingMethod
- order_item.shippingMethodType
- order_item.shippingEstimateAmount
from:
- { table: 'Oro\Bundle\OrderBundle\Entity\OrderLineItem', alias: order_item }
join:
left:
- { join: order_item.product, alias: product }
where:
and:
- order_item.order = :order_id
orderBy:
- column: order_item.id
dir: ASC
bind_parameters:
- order_id
order-line-items-grid:
extends: base-order-line-items-grid
columns:
productSku:
label: oro.product.sku.label
cellClassName: 'direction-ltr'
product:
label: oro.product.entity_label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/product.html.twig'
quantity:
label: oro.order.orderlineitem.quantity.label
frontend_type: decimal
productUnitCode:
label: oro.order.orderlineitem.product_unit_code.label
price:
label: oro.order.orderlineitem.price.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/price.html.twig'
shipBy:
label: oro.order.orderlineitem.ship_by.label
frontend_type: date
comment:
label: oro.order.orderlineitem.comment.label
shippingMethod:
label: oro.order.datagrid.orderlineitems.shipping_method.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/shippingMethodFull.html.twig'
renderable: false
shippingEstimateAmount:
label: oro.order.datagrid.orderlineitems.shipping_cost.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/lineItemShippingCost.html.twig'
renderable: false
order-line-items-grid-frontend:
extends: base-order-line-items-grid
columns:
product:
label: oro.product.entity_label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/frontendProduct.html.twig'
quantity:
label: oro.order.orderlineitem.quantity.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/frontendQuantity.html.twig'
price:
label: oro.order.orderlineitem.price.label
type: twig
frontend_type: html
template: '@OroOrder/Order/Datagrid/price.html.twig'
shipBy:
label: oro.order.orderlineitem.ship_by.label
frontend_type: date
comment:
label: oro.order.orderlineitem.comment.label
options:
toolbarOptions:
placement:
bottom: true
frontend: true
# This grid is used only for printed products on the order page of the storefront.
order-line-items-grid-frontend-print:
extends: order-line-items-grid-frontend
options:
jsmodules:
- oroorder/js/app/components/frontend-order-print
mode: client
toolbarOptions:
pagination:
onePage: true
frontend: true
order-shipping-trackings-grid:
extended_entity_name: 'Oro\Bundle\OrderBundle\Entity\OrderShippingTracking'
options:
entityHint: oro.order.shipping_tracking.entity_plural_label
entity_pagination: false
toolbarOptions:
hide: true
pagination:
onePage: true
source:
type: orm
query:
select:
- shipping_tracking.method
- shipping_tracking.number
from:
- { table: 'Oro\Bundle\OrderBundle\Entity\OrderShippingTracking', alias: shipping_tracking }
where:
and:
- shipping_tracking.order = :order_id
bind_parameters:
- order_id
columns:
method:
label: oro.order.shipping_tracking.method.label
type: twig
template: '@OroOrder/Order/Datagrid/shippingTrackingMethod.html.twig'
frontend_type: html
number:
label: oro.order.shipping_tracking.number.label
type: twig
template: '@OroOrder/Order/Datagrid/shippingTrackingLink.html.twig'
frontend_type: html
best-selling-products:
entity_name: 'Oro\Bundle\ReportBundle\Entity\CalendarDate'
options:
entityHint: oro.calendardate.entity_plural_label
export: true
source:
type: orm
query:
select:
- product.id AS productId
- product.sku AS productSku
- product.denormalizedDefaultName AS productName
- SUM (lineitem.quantity) as qtySold
- lineitem.productUnitCode as unitCode
from:
- { table: 'Oro\Bundle\ReportBundle\Entity\CalendarDate', alias: calendarDate }
join:
left:
-
join: 'Oro\Bundle\OrderBundle\Entity\Order'
alias: orderAlias
conditionType: WITH
condition: calendarDate.date = CAST(orderAlias.createdAt as DATE)
-
join: orderAlias.lineItems
alias: lineitem
-
join: lineitem.product
alias: product
groupBy: productId, unitCode
columns:
timePeriod:
label: oro.report.datagrid.column.time_period.label
productSku:
label: oro.product.sku.label
cellClassName: 'direction-ltr'
productName:
label: oro.product.names.label
qtySold:
label: oro.product.qty_sold.label
type: twig
template: '@OroOrder/Order/Datagrid/productQtySold.html.twig'
frontend_type: html
sorters:
columns:
timePeriod:
data_name: timePeriod
apply_callback: ['@oro_filter.date_grouping_filter', 'applyOrderBy']
productSku:
data_name: productSku
productName:
data_name: productName
qtySold:
data_name: qtySold
default:
timePeriod: DESC
productSku: DESC
filters:
columns:
timePeriod:
label: oro.report.datagrid.column.time_period.label
type: datetime
data_name: orderAlias.createdAt
productSku:
type: string
data_name: productSku
productName:
type: string
data_name: productName
skip_empty_periods:
label: oro.report.filter.skip_empty_periods.label
type: skip_empty_periods
data_name: productId
options:
field_options:
choices:
No: 0
Yes: 1
default_value: Yes
grouping:
label: oro.report.filter.grouping.label
type: date_grouping
data_name: calendarDate.date
column_name: timePeriod
calendar_entity: 'Oro\Bundle\ReportBundle\Entity\CalendarDate'
target_entity: 'Oro\Bundle\OrderBundle\Entity\Order'
not_nullable_field: product.id
joined_column: createdAt
joined_table: joinedTableAlias
options:
field_options:
choices:
Day: day
Month: month
Quarter: quarter
Year: year
default_value: Day
default:
grouping:
value: day
skip_empty_periods:
value: 1
order-payment-transactions-grid:
extends: payment-transactions-grid
source:
query:
where:
and:
- payment_transaction.entityClass = 'Oro\Bundle\OrderBundle\Entity\Order'
- payment_transaction.entityIdentifier = :order_id
bind_parameters:
- order_id