Databases > WideWorldImporters > Tables > Purchasing.SupplierTransactions

WideWorldImporters

Purchasing.SupplierTransactions

//
All financial transactions that are supplier-related

Created: Modified:

Columns

  • //
    ${escapify(column.description)}
    SupplierTransactionID
    [int] NOT NULL DEFAULT (NEXT VALUE FOR [Sequences].[TransactionID])
  • //
    ${escapify(column.description)}
    SupplierID
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    TransactionTypeID
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    PurchaseOrderID
    [int] NULL
  • //
    ${escapify(column.description)}
    PaymentMethodID
    [int] NULL
  • //
    ${escapify(column.description)}
    SupplierInvoiceNumber
    [nvarchar](20) NULL
  • //
    ${escapify(column.description)}
    TransactionDate
    [date] NOT NULL
  • //
    ${escapify(column.description)}
    AmountExcludingTax
    [decimal](18, 2) NOT NULL
  • //
    ${escapify(column.description)}
    TaxAmount
    [decimal](18, 2) NOT NULL
  • //
    ${escapify(column.description)}
    TransactionAmount
    [decimal](18, 2) NOT NULL
  • //
    ${escapify(column.description)}
    OutstandingBalance
    [decimal](18, 2) NOT NULL
  • //
    ${escapify(column.description)}
    FinalizationDate
    [date] NULL
  • //
    ${escapify(column.description)}
    IsFinalized
    [bit] NULL
  • LastEditedBy
    [int] NOT NULL
  • LastEditedWhen
    [datetime2](8) NOT NULL DEFAULT (sysdatetime())

Indexes

  • CX_Purchasing_SupplierTransactions
    CLUSTERED
    TransactionDate
  • //
    Auto-created to support a foreign key
    FK_Purchasing_SupplierTransactions_SupplierID
    NONCLUSTERED
    SupplierID , TransactionDate
  • //
    Auto-created to support a foreign key
    FK_Purchasing_SupplierTransactions_TransactionTypeID
    NONCLUSTERED
    TransactionTypeID , TransactionDate
  • //
    Auto-created to support a foreign key
    FK_Purchasing_SupplierTransactions_PurchaseOrderID
    NONCLUSTERED
    PurchaseOrderID , TransactionDate
  • //
    Auto-created to support a foreign key
    FK_Purchasing_SupplierTransactions_PaymentMethodID
    NONCLUSTERED
    PaymentMethodID , TransactionDate
  • //
    Index used to quickly locate unfinalized transactions
    IX_Purchasing_SupplierTransactions_IsFinalized
    NONCLUSTERED
    IsFinalized , TransactionDate
  • PK_Purchasing_SupplierTransactions
    UNIQUE NONCLUSTERED
    SupplierTransactionID

Foreign Keys

  • FK_Purchasing_SupplierTransactions_Application_People
    Application.People
    LastEditedBy ⥱ PersonID
  • FK_Purchasing_SupplierTransactions_PaymentMethodID_Application_PaymentMethods
    Application.PaymentMethods
    PaymentMethodID ⥱ PaymentMethodID
  • FK_Purchasing_SupplierTransactions_PurchaseOrderID_Purchasing_PurchaseOrders
    Purchasing.PurchaseOrders
    PurchaseOrderID ⥱ PurchaseOrderID
  • FK_Purchasing_SupplierTransactions_SupplierID_Purchasing_Suppliers
    Purchasing.Suppliers
    SupplierID ⥱ SupplierID
  • FK_Purchasing_SupplierTransactions_TransactionTypeID_Application_TransactionTypes
    Application.TransactionTypes
    TransactionTypeID ⥱ TransactionTypeID

Sample Data

SupplierTransactionID
SupplierID
TransactionTypeID
PurchaseOrderID
PaymentMethodID
SupplierInvoiceNumber
TransactionDate
AmountExcludingTax
TaxAmount
TransactionAmount
OutstandingBalance
FinalizationDate
IsFinalized
LastEditedBy
LastEditedWhen
134
2
5
1
4
7290
313.5
47.03
360.53
NULL
true
4
169
4
5
2
4
3898
21732
3259.8
24991.8
NULL
true
4
186
5
5
3
4
616
2740.5
411.11
3151.61
NULL
true
4
215
7
5
4
4
3869
42481.2
6372.19
48853.39
NULL
true
4
224
10
5
5
4
4697
35067.5
5260.14
40327.64
NULL
true
4
230
12
5
6
4
1375
5528.5
829.28
6357.78
NULL
true
4
565
4
5
7
4
3261
10000.5
1500.08
11500.58
NULL
true
4
570
5
5
8
4
1762
657
98.56
755.56
NULL
true
4
588
7
5
9
4
9301
9281.5
1392.24
10673.74
NULL
true
4
590
10
5
10
4
1853
1037.5
155.63
1193.13
NULL
true
4
594
12
5
11
4
8170
19869.5
2980.43
22849.93
NULL
true
4
932
4
5
12
4
5075
6661.5
999.23
7660.73
NULL
true
4
935
5
5
13
4
134
261
39.15
300.15
NULL
true
4
952
7
5
14
4
999
16279.45
2441.92
18721.37
NULL
true
4
955
10
5
15
4
4943
13325
1998.75
15323.75
NULL
true
4
959
12
5
16
4
9907
3768
565.2
4333.2
NULL
true
4
1390
4
5
17
4
4291
8808
1321.2
10129.2
NULL
true
4
1393
5
5
18
4
205
288
43.21
331.21
NULL
true
4
1400
7
5
19
4
7476
5230.2
784.53
6014.73
NULL
true
4
1402
10
5
20
4
364
7250
1087.5
8337.5
NULL
true
4
1408
4
5
21
4
252
5116
767.4
5883.4
NULL
true
4
1410
5
5
22
4
9981
157.5
23.63
181.13
NULL
true
4
1417
7
5
23
4
9410
3639.55
545.93
4185.48
NULL
true
4
1419
10
5
24
4
951
1245
186.75
1431.75
NULL
true
4
1422
12
5
25
4
4585
19278
2891.7
22169.7
NULL
true
4