<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="dsReceiptPOR" targetNamespace="http://tempuri.org/dsReceiptPOR.xsd" xmlns:mstns="http://tempuri.org/dsReceiptPOR.xsd" xmlns="http://tempuri.org/dsReceiptPOR.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="MySettings" AppSettingsPropertyName="SQLConnectionRPT" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="SQLConnectionRPT (MySettings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Superbowl_Cronjob.My.MySettings.GlobalReference.Default.SQLConnectionRPT" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="dsReceiptPORTableAdapter" GeneratorDataComponentClassName="dsReceiptPORTableAdapter" Name="dsReceiptPOR" UserDataComponentName="dsReceiptPORTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="SQLConnectionRPT (MySettings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        RIGHT('0000' + CAST(porRequisition.RequisitionID AS varchar(10)), 5) AS RequisitionID, porRequisition.strPONumber, mstUser.strUserName, 
                         LEFT(CONVERT(varchar(24), porRequisition.dtDate, 120), 10) AS dtDate, porRequisition.strRegion, mstVendor.VendorID + ' - ' + mstVendor.strVendor AS strVendor, 
                         porRequisition.strStatus, porRequisition.dtLastEdit, CASE WHEN porRequisition.strAuthorizedBy IS NULL OR
                         porRequisition.strAuthorizedBy = '' THEN '' ELSE CASE WHEN CHARINDEX('-', porRequisition.strAuthorizedBy) 
                         = 0 THEN porRequisition.strAuthorizedBy ELSE LEFT(porRequisition.strAuthorizedBy, CHARINDEX('-', porRequisition.strAuthorizedBy) - 1) 
                         END END AS strAuthorizedBy, CASE WHEN porRequisition.strAuthorizedBy IS NULL OR
                         porRequisition.strAuthorizedBy = '' THEN '' ELSE CASE WHEN CHARINDEX('-', porRequisition.strAuthorizedBy) 
                         = 0 THEN '' ELSE SUBSTRING(porRequisition.strAuthorizedBy, CHARINDEX('-', porRequisition.strAuthorizedBy) + 1, LEN(porRequisition.strAuthorizedBy)) 
                         END END AS strAuthorizedDate, porRequisition.txtRequestDetail, { fn IFNULL(porRequisition.strQuoteNumber, '') } AS strQuoteNumber, 
                         mstPaymentTerms.strPaymentTerm, tblManager.strUserName AS strManager, ISNULL(porRequisition.txtPartitionPayment, 'N/A') AS txtPartitionPayment, 
                         porReceipt.strReceiptNumber, porReceipt.strInvoiceNumber, LEFT(CONVERT(varchar(24), porReceipt.dtDate, 120), 10) AS ReceiptDate
FROM            porRequisition INNER JOIN
                         mstUser ON porRequisition.refUserID = mstUser.UserID INNER JOIN
                         mstVendor ON porRequisition.refVendorID = mstVendor.VendorID INNER JOIN
                         mstPaymentTerms ON porRequisition.refPaymentTermID = mstPaymentTerms.PaymentTermID INNER JOIN
                         mstUser AS tblManager ON porRequisition.refManagerID = tblManager.UserID INNER JOIN
                         porReceipt ON porRequisition.RequisitionID = porReceipt.refRequisitionID
WHERE        (porReceipt.ReceiptID = @ReceiptID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="ReceiptID" ColumnName="ReceiptID" DataSourceName="Superbowl.dbo.porReceipt" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ReceiptID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ReceiptID" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="RequisitionID" DataSetColumn="RequisitionID" />
              <Mapping SourceColumn="strPONumber" DataSetColumn="strPONumber" />
              <Mapping SourceColumn="strUserName" DataSetColumn="strUserName" />
              <Mapping SourceColumn="dtDate" DataSetColumn="dtDate" />
              <Mapping SourceColumn="strRegion" DataSetColumn="strRegion" />
              <Mapping SourceColumn="strVendor" DataSetColumn="strVendor" />
              <Mapping SourceColumn="strStatus" DataSetColumn="strStatus" />
              <Mapping SourceColumn="dtLastEdit" DataSetColumn="dtLastEdit" />
              <Mapping SourceColumn="strAuthorizedBy" DataSetColumn="strAuthorizedBy" />
              <Mapping SourceColumn="txtRequestDetail" DataSetColumn="txtRequestDetail" />
              <Mapping SourceColumn="strQuoteNumber" DataSetColumn="strQuoteNumber" />
              <Mapping SourceColumn="strPaymentTerm" DataSetColumn="strPaymentTerm" />
              <Mapping SourceColumn="strManager" DataSetColumn="strManager" />
              <Mapping SourceColumn="txtPartitionPayment" DataSetColumn="txtPartitionPayment" />
              <Mapping SourceColumn="strReceiptNumber" DataSetColumn="strReceiptNumber" />
              <Mapping SourceColumn="strInvoiceNumber" DataSetColumn="strInvoiceNumber" />
              <Mapping SourceColumn="ReceiptDate" DataSetColumn="ReceiptDate" />
              <Mapping SourceColumn="strAuthorizedDate" DataSetColumn="strAuthorizedDate" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="dsReceiptPOR" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="dsReceiptPOR" msprop:Generator_UserDSName="dsReceiptPOR">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="dsReceiptPOR" msprop:Generator_TableClassName="dsReceiptPORDataTable" msprop:Generator_TableVarName="tabledsReceiptPOR" msprop:Generator_TablePropName="_dsReceiptPOR" msprop:Generator_RowDeletingName="dsReceiptPORRowDeleting" msprop:Generator_RowChangingName="dsReceiptPORRowChanging" msprop:Generator_RowEvHandlerName="dsReceiptPORRowChangeEventHandler" msprop:Generator_RowDeletedName="dsReceiptPORRowDeleted" msprop:Generator_UserTableName="dsReceiptPOR" msprop:Generator_RowChangedName="dsReceiptPORRowChanged" msprop:Generator_RowEvArgName="dsReceiptPORRowChangeEvent" msprop:Generator_RowClassName="dsReceiptPORRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="RequisitionID" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnRequisitionID" msprop:Generator_ColumnPropNameInRow="RequisitionID" msprop:Generator_ColumnPropNameInTable="RequisitionIDColumn" msprop:Generator_UserColumnName="RequisitionID" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="5" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strPONumber" msprop:Generator_ColumnVarNameInTable="columnstrPONumber" msprop:Generator_ColumnPropNameInRow="strPONumber" msprop:Generator_ColumnPropNameInTable="strPONumberColumn" msprop:Generator_UserColumnName="strPONumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="15" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strUserName" msprop:Generator_ColumnVarNameInTable="columnstrUserName" msprop:Generator_ColumnPropNameInRow="strUserName" msprop:Generator_ColumnPropNameInTable="strUserNameColumn" msprop:Generator_UserColumnName="strUserName" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="dtDate" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columndtDate" msprop:Generator_ColumnPropNameInRow="dtDate" msprop:Generator_ColumnPropNameInTable="dtDateColumn" msprop:Generator_UserColumnName="dtDate" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="10" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strRegion" msprop:Generator_ColumnVarNameInTable="columnstrRegion" msprop:Generator_ColumnPropNameInRow="strRegion" msprop:Generator_ColumnPropNameInTable="strRegionColumn" msprop:Generator_UserColumnName="strRegion" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strVendor" msprop:Generator_ColumnVarNameInTable="columnstrVendor" msprop:Generator_ColumnPropNameInRow="strVendor" msprop:Generator_ColumnPropNameInTable="strVendorColumn" msprop:Generator_UserColumnName="strVendor" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="150" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strStatus" msprop:Generator_ColumnVarNameInTable="columnstrStatus" msprop:Generator_ColumnPropNameInRow="strStatus" msprop:Generator_ColumnPropNameInTable="strStatusColumn" msprop:Generator_UserColumnName="strStatus">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="20" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="dtLastEdit" msprop:Generator_ColumnVarNameInTable="columndtLastEdit" msprop:Generator_ColumnPropNameInRow="dtLastEdit" msprop:Generator_ColumnPropNameInTable="dtLastEditColumn" msprop:Generator_UserColumnName="dtLastEdit" type="xs:dateTime" />
              <xs:element name="strAuthorizedBy" msprop:Generator_ColumnVarNameInTable="columnstrAuthorizedBy" msprop:Generator_ColumnPropNameInRow="strAuthorizedBy" msprop:Generator_ColumnPropNameInTable="strAuthorizedByColumn" msprop:Generator_UserColumnName="strAuthorizedBy" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="txtRequestDetail" msprop:Generator_ColumnVarNameInTable="columntxtRequestDetail" msprop:Generator_ColumnPropNameInRow="txtRequestDetail" msprop:Generator_ColumnPropNameInTable="txtRequestDetailColumn" msprop:Generator_UserColumnName="txtRequestDetail" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strQuoteNumber" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnstrQuoteNumber" msprop:Generator_ColumnPropNameInRow="strQuoteNumber" msprop:Generator_ColumnPropNameInTable="strQuoteNumberColumn" msprop:Generator_UserColumnName="strQuoteNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strPaymentTerm" msprop:Generator_ColumnVarNameInTable="columnstrPaymentTerm" msprop:Generator_ColumnPropNameInRow="strPaymentTerm" msprop:Generator_ColumnPropNameInTable="strPaymentTermColumn" msprop:Generator_UserColumnName="strPaymentTerm">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strManager" msprop:Generator_ColumnVarNameInTable="columnstrManager" msprop:Generator_ColumnPropNameInRow="strManager" msprop:Generator_ColumnPropNameInTable="strManagerColumn" msprop:Generator_UserColumnName="strManager" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="txtPartitionPayment" msdata:ReadOnly="true" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="txtPartitionPayment" msprop:Generator_ColumnVarNameInTable="columntxtPartitionPayment" msprop:Generator_ColumnPropNameInTable="txtPartitionPaymentColumn" msprop:Generator_UserColumnName="txtPartitionPayment" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2147483647" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strReceiptNumber" msprop:Generator_ColumnVarNameInTable="columnstrReceiptNumber" msprop:Generator_ColumnPropNameInRow="strReceiptNumber" msprop:Generator_ColumnPropNameInTable="strReceiptNumberColumn" msprop:Generator_UserColumnName="strReceiptNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="16" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strInvoiceNumber" msprop:Generator_ColumnVarNameInTable="columnstrInvoiceNumber" msprop:Generator_ColumnPropNameInRow="strInvoiceNumber" msprop:Generator_ColumnPropNameInTable="strInvoiceNumberColumn" msprop:Generator_UserColumnName="strInvoiceNumber" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="ReceiptDate" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnReceiptDate" msprop:Generator_ColumnPropNameInRow="ReceiptDate" msprop:Generator_ColumnPropNameInTable="ReceiptDateColumn" msprop:Generator_UserColumnName="ReceiptDate" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="10" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="strAuthorizedDate" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnstrAuthorizedDate" msprop:Generator_ColumnPropNameInRow="strAuthorizedDate" msprop:Generator_ColumnPropNameInTable="strAuthorizedDateColumn" msprop:Generator_UserColumnName="strAuthorizedDate" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>