DBA Data[Home] [Help]

APPS.IBE_QUOTE_SAVE_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 114

  select quote_line_id, item_type_code ,quantity, inventory_item_id
  from aso_quote_lines
  where quote_header_id = p_quote_header_id
  and inventory_item_id = l_inventory_item_id;
Line: 159

  select l.quote_line_id
         ,l.item_type_code
         ,l.quantity
         ,l.inventory_item_id
         ,l.organization_id
         ,l.uom_code
         ,dl.quote_line_detail_id
         ,dl.service_duration
         ,dl.service_period
  from aso_quote_lines l, aso_quote_line_details dl
  where l.quote_header_id = p_quote_header_id
  and  l.item_type_code = 'SRV'
  and  dl.service_ref_line_id = p_service_ref_line_id
  and  dl.quote_line_id  = l.quote_line_id;
Line: 314

procedure updateserviceLine(
  p_qte_line_rec          IN  ASO_Quote_Pub.Qte_Line_Rec_Type
  ,p_qte_line_dtl_rec     IN  ASO_Quote_Pub.Qte_Line_dtl_Rec_Type
  ,p_qte_line_tbl_db      IN  ASO_Quote_Pub.Qte_Line_Tbl_Type
  ,p_qte_line_dtl_tbl_db  IN  ASO_Quote_Pub.Qte_Line_dtl_Tbl_Type
  ,x_qte_line_rec         OUT NOCOPY ASO_Quote_Pub.Qte_Line_Rec_Type
  ,x_qte_line_dtl_rec     OUT NOCOPY ASO_Quote_Pub.Qte_Line_dtl_Rec_Type
)
IS
  l_qte_line_rec      ASO_Quote_Pub.Qte_Line_Rec_Type
                      := ASO_Quote_Pub.g_miss_Qte_Line_rec;
Line: 334

     IBE_Util.Debug('updateserviceline p_qte_line_tbl_db.count='
               ||p_qte_line_tbl_db.count);
Line: 345

            IBE_Util.Debug('updateserviceline start update');
Line: 350

     IBE_Util.Debug('update service inventory_item_id'||l_qte_line_rec.inventory_item_id);
Line: 355

         l_qte_line_rec.operation_code := 'UPDATE';
Line: 362

                                := 'UPDATE';
Line: 376

     IBE_Util.Debug('update service inventory_item_id'||x_qte_line_rec.inventory_item_id);
Line: 377

     IBE_Util.Debug('update service quote_line_id'||x_qte_line_rec.quote_line_id);
Line: 378

     IBE_Util.Debug('update service quote_line_id'||x_qte_line_dtl_rec.quote_line_detail_id);
Line: 380

END updateserviceline;
Line: 394

    select term_id
    from oe_agreements
    where agreement_id = p_contract_id;
Line: 399

    select payment_id
    from aso_payments
    where quote_header_id = p_quote_hdr_id
    and quote_line_id is null;
Line: 462

          if(p_hdr_payment_tbl(counter).operation_code <> 'DELETE') then
            l_hdr_payment_tbl(counter).payment_term_id := l_payment_term_id;
Line: 484

        l_hdr_payment_tbl(counter).operation_code  := 'UPDATE';
Line: 559

   p_auto_update_active_quote IN  VARCHAR2  := FND_API.G_TRUE             ,
   p_hdr_payment_tbl          IN  aso_quote_pub.Payment_Tbl_Type          ,
   x_hdr_payment_tbl          OUT NOCOPY aso_quote_pub.Payment_Tbl_Type   ,
   x_qte_header_rec           OUT NOCOPY ASO_Quote_Pub.Qte_Header_Rec_Type,
   x_return_status            OUT NOCOPY VARCHAR2                         ,
   x_msg_count                OUT NOCOPY NUMBER                           ,
   x_msg_data                 OUT NOCOPY VARCHAR2
)
IS
   l_duration          NUMBER := NULL;
Line: 569

   l_last_update_date  DATE;
Line: 614

      /*A quote header_id is passed in during every update quote operation*/
      ELSE
         IF NOT FND_API.To_Boolean(p_auto_update_active_quote) THEN
            IF FND_Msg_Pub.Check_Msg_Level(FND_Msg_Pub.G_MSG_LVL_ERROR) THEN
               FND_Message.Set_Name('IBE', 'IBE_SC_QUOTE_NEED_REFRESH');
Line: 638

         SELECT price_list_id
         INTO x_qte_header_rec.price_list_id
         FROM OE_Agreements_B
         WHERE agreement_id = x_qte_header_rec.contract_id;
Line: 664

      SELECT party_id        ,
             cust_account_id ,
             last_update_date,
             contract_id     ,
             quote_source_code,
             resource_id,
             publish_flag,
             price_list_id
      INTO l_party_id        ,
           l_cust_account_id ,
           l_last_update_date,
           l_contract_id     ,
           l_quote_source_code,
           l_resource_id,
           l_publish_flag,
           l_price_list_id
      FROM aso_quote_headers_all
      WHERE quote_header_id = x_qte_header_rec.quote_header_id;
Line: 686

         x_qte_header_rec.last_update_date := l_last_update_date;
Line: 698

      Ideally we do not want to change the price list id put in by the Sales Rep for Update of published Quotes.
      This is true only when the agreement is not associated to the quote.*/
      IF (l_resource_id is not null AND nvl(l_publish_flag,'N')='Y'
       AND l_agmt_associated = FND_API.G_FALSE AND l_price_list_id is not null) THEN
        IF (IBE_UTIL.G_DEBUGON = l_true) THEN
           IBE_UTIL.debug('Please revert back the price list id as in the DB,as this is a Published quote, price_list_id='||l_price_list_id);
Line: 714

         SELECT price_list_id
         INTO x_qte_header_rec.price_list_id
         FROM OE_Agreements_B
         WHERE agreement_id = l_contract_id;
Line: 775

    	      SELECT payment_id into l_org_payment_id	FROM ASO_payments
			  WHERE QUOTE_HEADER_ID = x_qte_header_rec.quote_header_id AND quote_line_id is null;
Line: 852

  select quote_line_id, item_type_code ,quantity,marketing_source_code_id
  from aso_quote_lines
  where quote_header_id = p_quote_header_id
  and inventory_item_id = l_inventory_item_id and uom_code = l_uom_code;
Line: 859

  select pricing_line_type_indicator
  from aso_quote_lines
  where quote_header_id = p_quote_header_id;
Line: 937

      x_qte_line_tbl(i).operation_code := 'DELETE';
Line: 1006

            x_qte_line_tbl(i).operation_code := 'UPDATE';
Line: 1024

              updateserviceLine
                ( p_qte_line_rec         => x_qte_line_tbl(l_line_tbl_index)
                  ,p_qte_line_dtl_rec    => x_qte_line_dtl_tbl(l_line_dtl_tbl_index)
                  ,p_qte_line_tbl_db     => l_qte_line_tbl_service_db
                  ,p_qte_line_dtl_tbl_db => l_qte_line_dtl_tbl_service_db
                  ,x_qte_line_rec        => l_qte_line_tbl_tmp(l_line_tbl_index)
                  ,x_qte_line_dtl_rec    => l_qte_line_dtl_tbl_tmp(l_line_dtl_tbl_index));
Line: 1077

          x_qte_line_tbl(i).operation_code := 'UPDATE';
Line: 1145

PROCEDURE DeleteSharees(
  p_api_version_number   IN  NUMBER
  ,p_init_msg_list       IN  VARCHAR2 := FND_API.G_FALSE
  ,p_commit              IN  VARCHAR2 := FND_API.G_FALSE
  ,p_Quote_HEADER_ID     IN  NUMBER
  ,p_minisite_id         IN  NUMBER   := FND_API.G_MISS_NUM
  ,X_Return_Status       OUT NOCOPY VARCHAR2
  ,X_Msg_Count           OUT NOCOPY NUMBER
  ,X_Msg_Data            OUT NOCOPY VARCHAR2
)
IS
  l_api_name             CONSTANT VARCHAR2(30)    := 'DeleteSharees';
Line: 1160

    SELECT quote_sharee_id,
           party_id,
           cust_account_id,
           quote_sharee_number,
           contact_point_id,
           fnd.customer_id shared_by_party_id
    FROM IBE_SH_QUOTE_ACCESS, fnd_user fnd
    where quote_header_id = c_quote_header_id
    and ibe_sh_quote_access.created_by = fnd.user_id;
Line: 1175

   SAVEPOINT    DELETESHAREES_pvt;
Line: 1200

   /*DELETE
   FROM ibe_sh_quote_access
   WHERE quote_header_id = p_quote_header_id;*/
Line: 1213

        IBE_UTIL.DEBUG('DeleteSharees:Calling delete_recipient');
Line: 1216

     IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT(
       P_Quote_access_rec  => l_qte_access_rec ,
       p_minisite_id       => p_minisite_id    ,
       --p_notes             => p_notes          ,
       x_return_status     => x_return_status  ,
       x_msg_count         => x_msg_count      ,
       x_msg_data          => x_msg_data       );
Line: 1231

        IBE_UTIL.DEBUG('DeleteSharees:Done calling delete_recipient');
Line: 1248

      ROLLBACK TO DELETESHAREES_pvt;
Line: 1250

        IBE_UTIL.DEBUG('Expected error in IBE_QUOTE_SAVE_PVT.DeleteSharees');
Line: 1259

        IBE_UTIL.DEBUG('Unexpected error in IBE_QUOTE_SAVE_PVT.DeleteSharees');
Line: 1261

      ROLLBACK TO DELETESHAREES_pvt;
Line: 1268

        IBE_UTIL.DEBUG('Unknown error in IBE_QUOTE_SAVE_PVT.DeleteSharees');
Line: 1270

      ROLLBACK TO DELETESHAREES_pvt;
Line: 1279

END DeleteSharees;
Line: 1282

PROCEDURE Delete(
   p_api_version_number IN  NUMBER   := 1                  ,
   p_init_msg_list      IN  VARCHAR2 := FND_API.G_TRUE     ,
   p_commit             IN  VARCHAR2 := FND_API.G_FALSE    ,
   x_return_status      OUT NOCOPY VARCHAR2                ,
   x_msg_count          OUT NOCOPY NUMBER                  ,
   x_msg_data           OUT NOCOPY VARCHAR2                ,
   p_quote_header_id    IN  NUMBER                         ,
   p_expunge_flag       IN  VARCHAR2 := FND_API.G_TRUE     ,
   p_minisite_id        IN  NUMBER   :=FND_API.G_MISS_NUM  ,
   p_last_update_date   IN  DATE     := FND_API.G_MISS_DATE,
   p_Quote_access_tbl   IN  IBE_QUOTE_SAVESHARE_pvt.QUOTE_ACCESS_TBL_TYPE
                            := IBE_QUOTE_SAVESHARE_pvt.G_miss_quote_access_Tbl ,
   p_notes              IN  VARCHAR2 := FND_API.G_MISS_CHAR,
   -- in even that we are deleting a shared cart
   -- could be owner or admin recipient
   p_initiator_party_id IN  NUMBER  :=FND_API.G_MISS_NUM  ,
   p_initiator_account_id IN NUMBER  :=FND_API.G_MISS_NUM
)
IS
  l_api_name           CONSTANT VARCHAR2(30) := 'DELETE';
Line: 1309

  l_last_update_date  DATE;
Line: 1316

  select quote_status_id
  from aso_quote_statuses_vl
  where status_code = 'INACTIVE';
Line: 1321

  select quote_sharee_id
  from ibe_sh_quote_access
  where quote_header_id = c_qte_header_id;
Line: 1326

  select party_id, cust_account_id
  from aso_quote_headers_all
  where quote_header_id = p_quote_header_id;
Line: 1338

      IBE_Util.Debug('START IBE_Quote_Save_pvt.Delete()');
Line: 1342

   SAVEPOINT    DELETE_pvt;
Line: 1369

     select quote_sharee_number into l_retrieval_number
     from ibe_sh_quote_access
     where party_id = p_initiator_party_id
     and quote_header_id = p_quote_header_id
     and cust_account_id = p_initiator_account_id;
Line: 1382

     IBE_Quote_Misc_pvt.Validate_User_Update
     (
      p_init_msg_list          => FND_API.G_TRUE
     ,p_quote_header_id        => p_quote_header_id
     ,p_validate_user          => FND_API.G_TRUE
     ,p_quote_retrieval_number => l_retrieval_number
     ,p_privilege_type_code    => 'A'
     ,p_save_type              => OP_DELETE_CART
     ,p_last_update_date       => p_last_update_date
     ,x_return_status          => x_return_status
     ,x_msg_count              => x_msg_count
     ,x_msg_data               => x_msg_data

    );
Line: 1433

/*   -- validate last_update_date
   IF (p_last_update_date is not null
       and p_last_update_date <> FND_API.G_MISS_DATE) THEN
      IF (IBE_UTIL.G_DEBUGON = l_true) THEN
         IBE_UTIL.DEBUG('validate last_update_date ');
Line: 1439

      IBE_Quote_Misc_pvt.validateQuoteLastUpdateDate
      (   p_api_version_number   => p_api_version_number
           ,p_quote_header_id     => p_quote_header_id
           ,p_last_update_date    => p_last_update_date
           ,X_Return_Status       => x_return_status
           ,X_Msg_Count           => x_msg_count
           ,X_Msg_Data            => x_msg_data
      );
Line: 1458

     IBE_UTIL.DEBUG('Quote_save_pvt.Delete: Ready to call deactivate_quote');
Line: 1467

      p_delete_context   => 'IBE_SC_CART_DELETED',
      P_minisite_id      => p_minisite_id          ,
      p_notes            => p_notes                ,
      p_quote_access_tbl => p_quote_access_tbl     ,
      p_api_version      => p_api_version_number   ,
      p_init_msg_list    => fnd_api.g_false        ,
      p_commit           => fnd_api.g_false        ,
      x_return_status    => x_return_status        ,
      x_msg_count        => x_msg_count            ,
      x_msg_data         => x_msg_data             );
Line: 1494

   /*If p_expunge_flag is true then call aso_quote_pub.delete, else
     invalidate the quote setting the quote status to 'INVALID' status
     and expiring the quote*/

  IF (IBE_UTIL.G_DEBUGON = l_true) THEN
     IBE_UTIL.DEBUG('expunge flag is: '||p_expunge_flag);
Line: 1508

       IBE_Util.Debug('ASO_Quote_Pub.Delete_Quote() starts');
Line: 1513

    ASO_Quote_Pub.Delete_quote(
         P_Api_Version_Number => P_Api_Version_Number
        ,P_Init_Msg_List     => FND_API.G_FALSE
        ,P_Commit            => FND_API.G_FALSE
        ,P_qte_header_id     => P_Quote_Header_Id
        ,x_Return_Status     => x_return_status
        ,x_Msg_Count         => x_msg_count
        ,x_Msg_Data          => x_msg_data );
Line: 1525

       IBE_Util.Debug('ASO_Quote_Pub.Delete_Quote() finishes');
Line: 1546

    l_quote_header_rec.last_update_date      := p_last_update_date;
Line: 1559

       IBE_UTIL.DEBUG('l_quote_header_rec.last_update_date :'||l_quote_header_rec.last_update_date);
Line: 1567

        p_save_type          => OP_DELETE_CART                     ,
        p_qte_header_rec     => l_Quote_header_rec                 ,
        x_quote_header_id    => l_quote_header_id                  ,
        x_last_update_date   => l_last_update_date                 ,

        x_return_status      => x_return_status                    ,
        x_msg_count          => x_msg_count                        ,
        x_msg_data           => x_msg_data);
Line: 1598

     IBE_Util.Debug('End   IBE_Quote_Save_pvt.Delete()');
Line: 1604

        IBE_Util.Debug('Expected error: End   IBE_Quote_Save_pvt.Delete()');
Line: 1607

      ROLLBACK TO DELETE_pvt;
Line: 1615

         IBE_Util.Debug('Unexpected error: End   IBE_Quote_Save_pvt.Delete()');
Line: 1617

      ROLLBACK TO DELETE_pvt;
Line: 1625

         IBE_Util.Debug('Unknown error: End   IBE_Quote_Save_pvt.Delete()');
Line: 1627

      ROLLBACK TO DELETE_pvt;
Line: 1637

END DELETE;
Line: 1640

PROCEDURE DeleteAllLines(
   p_api_version_number IN  NUMBER   := 1                  ,
   p_init_msg_list      IN  VARCHAR2 := FND_API.G_TRUE     ,
   p_commit             IN  VARCHAR2 := FND_API.G_FALSE    ,
   x_return_status      OUT NOCOPY VARCHAR2                       ,
   x_msg_count          OUT NOCOPY NUMBER                         ,
   x_msg_data           OUT NOCOPY VARCHAR2                       ,
   p_quote_header_id    IN  NUMBER                         ,
   p_last_update_date   IN  DATE     := FND_API.G_MISS_DATE,
   p_sharee_number      IN  NUMBER   := FND_API.G_MISS_NUM ,
   x_quote_header_id    OUT NOCOPY NUMBER                         ,
   x_last_update_date   OUT NOCOPY DATE
)
is
  l_api_name         CONSTANT VARCHAR2(30)   := 'DELETEALLLINES';
Line: 1668

  select quote_line_id
  from aso_quote_lines
  where quote_header_id = p_quote_header_id;
Line: 1673

   SAVEPOINT    DELETEALLLINES_pvt;
Line: 1692

   IBE_Quote_Misc_pvt.Validate_User_Update
   ( p_init_msg_list               => p_init_msg_list
    ,p_quote_header_id          => p_quote_header_id
    ,p_quote_retrieval_number     => p_sharee_number
    ,p_validate_user          => FND_API.G_TRUE
    ,x_return_status              => x_return_status
    ,x_msg_count              => x_msg_count
    ,x_msg_data                   => x_msg_data
    );
Line: 1718

      l_qte_line_rec.operation_code  := 'DELETE';
Line: 1738

       ,x_last_update_date      => x_last_update_date
       ,x_return_status         => x_return_status
       ,x_msg_count             => x_msg_count
       ,x_msg_data              => x_msg_data
   );
Line: 1765

         IBE_Util.Debug('Expected error: IBE_Quote_Save_pvt.DeleteAllLines()');
Line: 1767

    ROLLBACK TO DELETEALLLINES_pvt;
Line: 1775

        IBE_Util.Debug('Unexpected error:IBE_Quote_Save_pvt.DeleteAllLines()');
Line: 1778

    ROLLBACK TO DELETEALLLINES_pvt;
Line: 1785

        IBE_Util.Debug('Unknown error: IBE_Quote_Save_pvt.DeleteAllLines()');
Line: 1788

      ROLLBACK TO DELETEALLLINES_pvt;
Line: 1798

END DeleteAllLines;
Line: 1801

PROCEDURE Set_Last_Update_Date(p_qte_header_id IN NUMBER,
                       px_last_update_date OUT NOCOPY DATE)
IS
BEGIN
  IF p_qte_header_id <> FND_API.G_MISS_NUM THEN
    px_last_update_date := IBE_Quote_Misc_pvt.getQuoteLastUpdateDate(p_qte_header_id);
Line: 1808

END Set_Last_Update_Date;
Line: 1866

  ,x_last_update_date         OUT NOCOPY  DATE
  ,X_Return_Status            OUT NOCOPY  VARCHAR2
  ,X_Msg_Count                OUT NOCOPY  NUMBER
  ,X_Msg_Data                 OUT NOCOPY  VARCHAR2
)
is

  l_api_name                        CONSTANT VARCHAR2(30)   := 'AddItemsToCart';
Line: 1945

    select  aqld.service_ref_line_id refLine, aql2.inventory_item_id invId
      from  ASO_QUOTE_LINES          aql,
            ASO_QUOTE_LINES          aql2,
            ASO_QUOTE_LINE_DETAILS   aqld
      where aql.item_type_code  = 'SVA'                    and
            aql.quote_line_id   = aqld.service_ref_line_id and
            aql.quote_header_id = l_quote_header_id        and
            aqld.quote_line_id  = aql2.quote_line_id
      order by  aql2.QUOTE_LINE_ID;
Line: 1957

    select  PRIMARY_UOM_CODE uomCode, SERVICE_DURATION_PERIOD_CODE period, SERVICE_DURATION duration
    from  MTL_SYSTEM_ITEMS_VL
    where inventory_item_id = l_inventory_item_id      and
          organization_id   = l_organization_id;
Line: 1963

  Select ql.quote_line_id
  From aso_quote_lines ql, aso_quote_line_details qld
  where ql.quote_line_id   = qld.quote_line_id
  And qld.service_ref_line_id = c_service_ref_line_id;
Line: 1976

    select marketing_source_code_id
    from aso_quote_headers_all
    where quote_header_id = p_quote_header_id;
Line: 1987

    select pricing_attribute1
    from aso_price_attributes
    where quote_header_id = p_quote_header_id
    and quote_line_id is null;
Line: 1995

    select 1 from fnd_lookups
    where lookup_type = p_support_lookup_type
    and   lookup_code = p_support_lookup_code;
Line: 2090

        SELECT COUNT(*) INTO l_numLines
        FROM aso_quote_lines
        WHERE quote_header_id = p_Qte_Header_Rec.quote_header_id;
Line: 2112

        SELECT COUNT(*) INTO l_numLines
        FROM aso_quote_lines
        WHERE quote_header_id = p_Qte_Header_Rec.quote_header_id and
            item_type_code  = 'SVA';
Line: 2146

             SELECT COUNT(inventory_item_id) INTO l_numLines
             FROM aso_quote_lines
             WHERE quote_header_id = p_Qte_Header_Rec.quote_header_id and
                   inventory_item_id = l_Qte_Line_Tbl(i).inventory_item_id;
Line: 2381

                l_Qte_Line_Tbl(l_Qte_Line_Tbl.count).operation_code :=  'DELETE';
Line: 2475

           ,x_last_update_date            => x_last_update_date
           ,X_Return_Status               => x_Return_Status
           ,X_Msg_Count                   => x_Msg_Count
           ,X_Msg_Data                    => x_Msg_Data
           );
Line: 2599

    ,x_last_update_date            => x_last_update_date
    ,x_Qte_Header_Rec              => lx_Qte_Header_Rec_tmp
    ,x_Hd_Price_Attributes_Tbl     => lx_Hd_Price_Attributes_Tbl_tmp
    ,x_Hd_Payment_Tbl              => lx_Hd_Payment_Tbl_tmp
    ,x_Hd_Shipment_Tbl             => lx_Hd_Shipment_Tbl_tmp
    ,x_Hd_Shipment_Rec             => lx_Hd_Shipment_Rec
    ,x_Hd_Freight_Charge_Tbl       => lx_Hd_Freight_Charge_Tbl_tmp
    ,x_Hd_Tax_Detail_Tbl           => lx_Hd_Tax_Detail_Tbl_tmp
    ,x_Qte_Line_Tbl                => x_Qte_Line_Tbl
    ,x_Qte_Line_Dtl_Tbl            => lx_Qte_Line_Dtl_Tbl
    ,x_Line_Attr_Ext_Tbl           => lx_Line_Attr_Ext_Tbl
    ,x_Line_rltship_tbl            => lx_Line_rltship_tbl
    ,x_Ln_Price_Attributes_Tbl     => lx_Ln_Price_Attributes_Tbl
    ,x_Ln_Payment_Tbl              => lx_Ln_Payment_Tbl
    ,x_Ln_Shipment_Tbl             => lx_Ln_Shipment_Tbl
    ,x_Ln_Freight_Charge_Tbl       => lx_Ln_Freight_Charge_Tbl
    ,x_Ln_Tax_Detail_Tbl           => lx_Ln_Tax_Detail_Tbl
    ,x_Price_Adjustment_Tbl        => lx_Price_Adjustment_Tbl_tmp
    ,x_Price_Adj_Attr_Tbl          => lx_Price_Adj_Attr_Tbl_tmp
    ,x_Price_Adj_Rltship_Tbl       => lx_Price_Adj_Rltship_Tbl_tmp
    ,X_Return_Status               => x_Return_Status
    ,X_Msg_Count                   => x_Msg_Count
    ,X_Msg_Data                    => x_Msg_Data
  );
Line: 2888

  ,x_last_update_date         OUT NOCOPY  DATE
  ,X_Return_Status            OUT NOCOPY  VARCHAR2
  ,X_Msg_Count                OUT NOCOPY  NUMBER
  ,X_Msg_Data                 OUT NOCOPY  VARCHAR2
)
is

  l_api_name                    CONSTANT VARCHAR2(30)   := 'ADDMODELSTOCART';
Line: 2923

  l_input_selection             cz_cf_api.input_selection;
Line: 2968

   IBE_Quote_Misc_pvt.Validate_User_Update
   (  p_init_msg_list           => p_init_msg_list
     ,p_quote_header_id            => p_Qte_Header_Rec.quote_header_id
     ,p_party_id                => p_Qte_Header_Rec.party_id
     ,p_cust_account_id            => p_Qte_Header_Rec.cust_account_id
     ,p_quote_retrieval_number    => p_sharee_Number
     ,p_validate_user            => FND_API.G_TRUE
     ,P_save_type               => P_save_flag
     ,p_last_update_date        => p_Qte_Header_Rec.last_update_date
     ,x_return_status           => x_return_status
     ,x_msg_count               => lx_msg_count
     ,x_msg_data                => lx_msg_data
    );
Line: 3058

     ,x_last_update_date         => x_last_update_date
     ,X_Return_Status            => x_return_status
     ,X_Msg_Count                => lx_msg_count
     ,X_Msg_Data                 => lx_msg_data
  );
Line: 3231

  /*This cursor selects price_list_id and term_id(payment_term_id as in aso_payments) */
  cursor c_term_pricelist(p_agreement_id number) is
        select price_list_id, term_id
        from oe_agreements_b
        where agreement_id = p_agreement_id;
Line: 3236

  /*This cursor selects payment_id from aso_payments based on the qte_header_id and quote_line_id*/
  cursor c_payment_id(p_quote_header_id number, p_quote_line_id number) is
        select payment_id
        from aso_payments
        where quote_header_id = p_quote_header_id
        and quote_line_id = p_quote_line_id;
Line: 3316

      if the record is present then operation code in the l_ln_payment_tbl= 'UPDATE'
      else it is 'CREATE'*/
      l_payment_id  := fnd_api.g_miss_num;
Line: 3347

          (l_ln_payment_tbl(l_pmt_rec_counter).operation_code <> 'DELETE')) then
        if (l_payment_id <> fnd_api.g_miss_num ) then
          IF (IBE_UTIL.G_DEBUGON = l_true) THEN
             ibe_util.debug('Operation code is UPDATE');
Line: 3352

          l_ln_payment_tbl(l_pmt_rec_counter).operation_code := 'UPDATE';
Line: 3415

    Select resource_id,quote_name
    from aso_quote_headers_all
    Where quote_header_id = quote_hdr_id;
Line: 3566

          x_last_update_date   OUT NOCOPY Date                ,
          p_minisite_id        IN  NUMBER                     ,
          p_last_update_date   IN  Date                       ,
          p_quote_header_id    IN  NUMBER:= FND_API.G_MISS_NUM,
          p_party_id           IN  NUMBER:= FND_API.G_MISS_NUM,
          p_cust_account_id    IN  NUMBER:= FND_API.G_MISS_NUM,
          p_validate_user      IN  VARCHAR2:= FND_API.G_FALSE ,
          P_quote_name         IN  VARCHAR2                   ,
          P_Reason_code        IN  VARCHAR2                   ,
          P_url                IN  VARCHAR2:= FND_API.G_MISS_CHAR,
          P_COMMENTS           IN  VARCHAR2,
          p_retrieval_number   IN  NUMBER   := FND_API.G_MISS_NUM,
          p_contract_context   IN  VARCHAR2 :='N',
          p_notes              IN  VARCHAR2 := NULL) is

  Cursor c_find_resourceid(qte_hdr_id number) is
            select resource_id,ASSISTANCE_REASON_CODE
            from aso_quote_headers_all
            where quote_header_id = qte_hdr_id;
Line: 3586

            select resource_id
            from jtf_rs_salesreps_mo_v
            where salesrep_id = salesrep;*/
Line: 3592

            SELECT Resource_Id
            /* FROM JTF_RS_SRP_VL */
            FROM JTF_RS_SALESREPS_MO_V
            WHERE Salesrep_number = l_Srep
            AND NVL(status,'A') = 'A'
            AND nvl(trunc(start_date_active), trunc(sysdate)) <= trunc(sysdate)
            AND nvl(trunc(end_date_active), trunc(sysdate)) >= trunc(sysdate) ;
Line: 3602

            select user_id
            from jtf_rs_resource_extns
            where resource_id = resourceid;
Line: 3606

            select quote_status_id
            from aso_quote_statuses_b
            where status_code = p_status_code;
Line: 3611

           select lookup_code, meaning
           from fnd_lookup_values_vl
           where lookup_code = lkp_code
           and   lookup_type = 'IBE_SALES_ASSIST_REASONS_LK';
Line: 3633

  lx_last_update_date   DATE;
Line: 3684

  IBE_Quote_Misc_pvt.Validate_User_Update
   (  p_init_msg_list   => p_Init_Msg_List
     ,p_quote_header_id => p_quote_header_id
     ,p_party_id        => p_party_id
     ,p_cust_account_id => p_cust_account_id
     ,p_validate_user   => p_validate_user
     ,p_quote_retrieval_number => p_retrieval_number
     ,p_save_type       => SALES_ASSISTANCE
     ,p_last_update_date => p_last_update_date
     ,x_return_status   => lx_return_status
     ,x_msg_count       => lx_msg_count
     ,x_msg_data        => lx_msg_data
    );
Line: 3772

    l_qte_hdr_rec.last_update_date := p_last_update_date;
Line: 3795

         x_last_update_date         => lx_last_update_date ,
         x_return_status            => lx_return_status    ,
         x_msg_count                => lx_msg_count        ,
         x_msg_data                 => lx_msg_data);
Line: 3914

  this is done because recipients cannot update a cart after it becomes a quote*/

  IF (IBE_UTIL.G_DEBUGON = l_true) THEN
     IBE_UTIL.DEBUG('Calling share_readonly to downgrade the access levels of  all recipients to R status');
Line: 4052

    Set_Last_Update_Date(p_quote_header_id, x_last_update_date);
Line: 4073

    Set_Last_Update_Date(p_quote_header_id, x_last_update_date);
Line: 4090

  ,p_auto_update_active_quote IN   VARCHAR2   := FND_API.G_TRUE
  ,p_combineSameItem          IN   VARCHAR2   := FND_API.G_MISS_CHAR

  ,p_sharee_Number            IN   Number     := FND_API.G_MISS_NUM
  ,p_sharee_party_id          IN   Number     := FND_API.G_MISS_NUM
  ,p_sharee_cust_account_id   IN   Number     := FND_API.G_MISS_NUM
  ,p_minisite_id              IN   NUMBER     := FND_API.G_MISS_NUM
  ,p_changeowner              IN   VARCHAR2   := FND_API.G_FALSE

  ,p_Control_Rec              IN   ASO_Quote_Pub.Control_Rec_Type
                                     := ASO_Quote_Pub.G_Miss_Control_Rec
  ,p_Qte_Header_Rec           IN   ASO_Quote_Pub.Qte_Header_Rec_Type
                                     := ASO_Quote_Pub.G_MISS_Qte_Header_Rec
  ,p_hd_Price_Attributes_Tbl  IN   ASO_Quote_Pub.Price_Attributes_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Price_Attributes_Tbl
  ,p_hd_Payment_Tbl           IN   ASO_Quote_Pub.Payment_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_PAYMENT_TBL
  ,p_hd_Shipment_TBL          IN   ASO_Quote_Pub.Shipment_tbl_Type
                                     := ASO_Quote_Pub.G_MISS_SHIPMENT_TBL
  ,p_hd_Freight_Charge_Tbl    IN   ASO_Quote_Pub.Freight_Charge_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Freight_Charge_Tbl
  ,p_hd_Tax_Detail_Tbl        IN   ASO_Quote_Pub.Tax_Detail_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Tax_Detail_Tbl
  ,p_Qte_Line_Tbl             IN   ASO_Quote_Pub.Qte_Line_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_QTE_LINE_TBL
  ,p_Qte_Line_Dtl_Tbl         IN   ASO_Quote_Pub.Qte_Line_Dtl_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_QTE_LINE_DTL_TBL
  ,p_Line_Attr_Ext_Tbl        IN   ASO_Quote_Pub.Line_Attribs_Ext_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_Line_Attribs_Ext_TBL
  ,p_line_rltship_tbl         IN   ASO_Quote_Pub.Line_Rltship_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_Line_Rltship_Tbl
  ,p_Price_Adjustment_Tbl     IN   ASO_Quote_Pub.Price_Adj_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Price_Adj_Tbl
  ,p_Price_Adj_Attr_Tbl       IN   ASO_Quote_Pub.Price_Adj_Attr_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_PRICE_ADJ_ATTR_Tbl
  ,p_Price_Adj_Rltship_Tbl    IN   ASO_Quote_Pub.Price_Adj_Rltship_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Price_Adj_Rltship_Tbl
  ,p_Ln_Price_Attributes_Tbl  IN   ASO_Quote_Pub.Price_Attributes_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Price_Attributes_Tbl
  ,p_Ln_Payment_Tbl           IN   ASO_Quote_Pub.Payment_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_PAYMENT_TBL
  ,p_Ln_Shipment_Tbl          IN   ASO_Quote_Pub.Shipment_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_SHIPMENT_TBL
  ,p_Ln_Freight_Charge_Tbl    IN   ASO_Quote_Pub.Freight_Charge_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Freight_Charge_Tbl
  ,p_Ln_Tax_Detail_Tbl        IN   ASO_Quote_Pub.Tax_Detail_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Tax_Detail_Tbl
  ,p_save_type                IN   NUMBER := FND_API.G_MISS_NUM
  ,x_quote_header_id          OUT NOCOPY  varchar2
  ,x_last_update_date         OUT NOCOPY  DATE
  ,X_Return_Status            OUT NOCOPY  VARCHAR2
  ,X_Msg_Count                OUT NOCOPY  NUMBER
  ,X_Msg_Data                 OUT NOCOPY  VARCHAR2
)
is
  lx_Qte_Header_Rec                    ASO_Quote_Pub.Qte_Header_Rec_Type;
Line: 4178

    ,p_auto_update_active_quote    => p_auto_update_active_quote
    ,p_combineSameItem             => p_combineSameItem
    ,p_sharee_Number               => p_sharee_Number
    ,p_sharee_party_id             => p_sharee_party_id
    ,p_sharee_cust_account_id      => p_sharee_cust_account_id
    ,p_minisite_id                 => p_minisite_id
    ,p_changeowner                 => p_changeowner
    ,p_Control_Rec                 => p_Control_Rec
    ,p_Qte_Header_Rec              => p_Qte_Header_Rec
    ,p_hd_Price_Attributes_Tbl     => p_hd_Price_Attributes_Tbl
    ,p_hd_Payment_Tbl              => p_hd_Payment_Tbl
    ,p_hd_Shipment_Tbl             => p_hd_Shipment_Tbl
    ,p_hd_Freight_Charge_Tbl       => p_hd_Freight_Charge_Tbl
    ,p_hd_Tax_Detail_Tbl           => p_hd_Tax_Detail_tbl
    ,p_Qte_Line_Tbl                => p_Qte_Line_Tbl
    ,p_Qte_Line_Dtl_Tbl            => p_Qte_Line_Dtl_Tbl
    ,p_Line_Attr_Ext_Tbl           => p_Line_Attr_Ext_Tbl
    ,p_line_rltship_tbl            => p_line_rltship_tbl
    ,p_Price_Adjustment_Tbl        => p_Price_Adjustment_Tbl
    ,p_Price_Adj_Attr_Tbl          => p_Price_Adj_Attr_Tbl
    ,p_Price_Adj_Rltship_Tbl       => p_Price_Adj_Rltship_Tbl
    ,p_Ln_Price_Attributes_Tbl     => p_Ln_Price_Attributes_Tbl
    ,p_Ln_Payment_Tbl              => p_Ln_Payment_Tbl
    ,p_Ln_Shipment_Tbl             => p_Ln_Shipment_Tbl
    ,p_Ln_Freight_Charge_Tbl       => p_Ln_Freight_Charge_Tbl
    ,p_Ln_Tax_Detail_Tbl           => p_Ln_Tax_Detail_Tbl
    ,p_save_type                   => p_save_type
    ,x_quote_header_id             => x_quote_header_id
    ,x_last_update_date            => x_last_update_date
    ,x_Qte_Header_Rec              => lx_Qte_Header_Rec
    ,x_Hd_Price_Attributes_Tbl     => lx_Hd_Price_Attributes_Tbl
    ,x_Hd_Payment_Tbl              => lx_Hd_Payment_Tbl
    ,x_Hd_Shipment_Tbl             => lx_Hd_Shipment_Tbl
    ,x_Hd_Shipment_Rec             => lx_Hd_Shipment_Rec
    ,x_Hd_Freight_Charge_Tbl       => lx_Hd_Freight_Charge_Tbl
    ,x_Hd_Tax_Detail_Tbl           => lx_Hd_Tax_Detail_Tbl
    ,x_Qte_Line_Tbl                => lx_Qte_Line_Tbl
    ,x_Qte_Line_Dtl_Tbl            => lx_Qte_Line_Dtl_Tbl
    ,x_Line_Attr_Ext_Tbl           => lx_Line_Attr_Ext_Tbl
    ,x_Line_rltship_tbl            => lx_Line_rltship_tbl
    ,x_Ln_Price_Attributes_Tbl     => lx_Ln_Price_Attributes_Tbl
    ,x_Ln_Payment_Tbl              => lx_Ln_Payment_Tbl
    ,x_Ln_Shipment_Tbl             => lx_Ln_Shipment_Tbl
    ,x_Ln_Freight_Charge_Tbl       => lx_Ln_Freight_Charge_Tbl
    ,x_Ln_Tax_Detail_Tbl           => lx_Ln_Tax_Detail_Tbl
    ,x_Price_Adjustment_Tbl        => lx_Price_Adjustment_Tbl
    ,x_Price_Adj_Attr_Tbl          => lx_Price_Adj_Attr_Tbl
    ,x_Price_Adj_Rltship_Tbl       => lx_Price_Adj_Rltship_Tbl
    ,X_Return_Status               => x_Return_Status
    ,X_Msg_Count                   => x_Msg_Count
    ,X_Msg_Data                    => x_Msg_Data
  );
Line: 4241

  ,p_auto_update_active_quote IN   VARCHAR2   := FND_API.G_TRUE
  ,p_combineSameItem          IN   VARCHAR2   := FND_API.G_MISS_CHAR

  ,p_sharee_Number            IN   Number     := FND_API.G_MISS_NUM
  ,p_sharee_party_id          IN   Number     := FND_API.G_MISS_NUM
  ,p_sharee_cust_account_id   IN   Number     := FND_API.G_MISS_NUM
  ,p_minisite_id              IN   NUMBER     := FND_API.G_MISS_NUM
  ,p_changeowner              IN   VARCHAR2   := FND_API.G_FALSE

  ,p_Control_Rec              IN   ASO_Quote_Pub.Control_Rec_Type
                                     := ASO_Quote_Pub.G_Miss_Control_Rec
  ,p_Qte_Header_Rec           IN   ASO_Quote_Pub.Qte_Header_Rec_Type
                                     := ASO_Quote_Pub.G_MISS_Qte_Header_Rec
  ,p_hd_Price_Attributes_Tbl  IN   ASO_Quote_Pub.Price_Attributes_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Price_Attributes_Tbl
  ,p_hd_Payment_Tbl           IN   ASO_Quote_Pub.Payment_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_PAYMENT_TBL
  ,p_hd_Shipment_TBL          IN   ASO_Quote_Pub.Shipment_tbl_Type
                                     := ASO_Quote_Pub.G_MISS_SHIPMENT_TBL
  ,p_hd_Freight_Charge_Tbl    IN   ASO_Quote_Pub.Freight_Charge_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Freight_Charge_Tbl
  ,p_hd_Tax_Detail_Tbl        IN   ASO_Quote_Pub.Tax_Detail_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Tax_Detail_Tbl
  ,p_Qte_Line_Tbl             IN   ASO_Quote_Pub.Qte_Line_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_QTE_LINE_TBL
  ,p_Qte_Line_Dtl_Tbl         IN   ASO_Quote_Pub.Qte_Line_Dtl_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_QTE_LINE_DTL_TBL
  ,p_Line_Attr_Ext_Tbl        IN   ASO_Quote_Pub.Line_Attribs_Ext_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_Line_Attribs_Ext_TBL
  ,p_line_rltship_tbl         IN   ASO_Quote_Pub.Line_Rltship_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_Line_Rltship_Tbl
  ,p_Price_Adjustment_Tbl     IN   ASO_Quote_Pub.Price_Adj_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Price_Adj_Tbl
  ,p_Price_Adj_Attr_Tbl       IN   ASO_Quote_Pub.Price_Adj_Attr_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_PRICE_ADJ_ATTR_Tbl
  ,p_Price_Adj_Rltship_Tbl    IN   ASO_Quote_Pub.Price_Adj_Rltship_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Price_Adj_Rltship_Tbl
  ,p_Ln_Price_Attributes_Tbl  IN   ASO_Quote_Pub.Price_Attributes_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Price_Attributes_Tbl
  ,p_Ln_Payment_Tbl           IN   ASO_Quote_Pub.Payment_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_PAYMENT_TBL
  ,p_Ln_Shipment_Tbl          IN   ASO_Quote_Pub.Shipment_Tbl_Type
                                     := ASO_Quote_Pub.G_MISS_SHIPMENT_TBL
  ,p_Ln_Freight_Charge_Tbl    IN   ASO_Quote_Pub.Freight_Charge_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Freight_Charge_Tbl
  ,p_Ln_Tax_Detail_Tbl        IN   ASO_Quote_Pub.Tax_Detail_Tbl_Type
                                     := ASO_Quote_Pub.G_Miss_Tax_Detail_Tbl
  ,p_save_type                IN   NUMBER := FND_API.G_MISS_NUM
  ,x_quote_header_id          OUT NOCOPY  varchar2
  ,x_last_update_date         OUT NOCOPY  DATE

  ,x_Qte_Header_Rec           IN OUT NOCOPY ASO_Quote_Pub.Qte_Header_Rec_Type
  ,x_Hd_Price_Attributes_Tbl  IN OUT NOCOPY ASO_Quote_Pub.Price_Attributes_Tbl_Type
  ,x_Hd_Payment_Tbl          IN OUT NOCOPY ASO_Quote_Pub.Payment_Tbl_Type
  ,x_Hd_Shipment_Tbl          IN OUT NOCOPY ASO_Quote_Pub.Shipment_Tbl_Type
  ,x_Hd_Shipment_Rec          IN OUT NOCOPY ASO_Quote_Pub.Shipment_Rec_Type
  ,x_Hd_Freight_Charge_Tbl    IN OUT NOCOPY ASO_Quote_Pub.Freight_Charge_Tbl_Type
  ,x_Hd_Tax_Detail_Tbl        IN OUT NOCOPY ASO_Quote_Pub.TAX_DETAIL_TBL_TYPE
  ,x_Qte_Line_Tbl             IN OUT NOCOPY ASO_Quote_Pub.Qte_Line_Tbl_Type
  ,x_Qte_Line_Dtl_Tbl         IN OUT NOCOPY ASO_Quote_Pub.Qte_Line_Dtl_Tbl_Type
  ,x_Line_Attr_Ext_Tbl        IN OUT NOCOPY ASO_Quote_Pub.Line_Attribs_Ext_Tbl_Type
  ,x_Line_rltship_tbl         IN OUT NOCOPY ASO_Quote_Pub.Line_Rltship_Tbl_Type
  ,x_Ln_Price_Attributes_Tbl  IN OUT NOCOPY ASO_Quote_Pub.Price_Attributes_Tbl_Type
  ,x_Ln_Payment_Tbl           IN OUT NOCOPY ASO_Quote_Pub.Payment_Tbl_Type
  ,x_Ln_Shipment_Tbl          IN OUT NOCOPY ASO_Quote_Pub.Shipment_Tbl_Type
  ,x_Ln_Freight_Charge_Tbl    IN OUT NOCOPY ASO_Quote_Pub.Freight_Charge_Tbl_Type
  ,x_Ln_Tax_Detail_Tbl        IN OUT NOCOPY ASO_Quote_Pub.TAX_DETAIL_TBL_TYPE
  ,x_Price_Adjustment_Tbl     IN OUT NOCOPY ASO_Quote_Pub.Price_Adj_Tbl_Type
  ,x_Price_Adj_Attr_Tbl       IN OUT NOCOPY ASO_Quote_Pub.Price_Adj_Attr_Tbl_Type
  ,x_Price_Adj_Rltship_Tbl    IN OUT NOCOPY ASO_Quote_Pub.Price_Adj_Rltship_Tbl_Type

  ,X_Return_Status            OUT NOCOPY  VARCHAR2
  ,X_Msg_Count                OUT NOCOPY  NUMBER
  ,X_Msg_Data                 OUT NOCOPY  VARCHAR2
)
is
  l_api_name             CONSTANT VARCHAR2(30)   := 'SAVE';
Line: 4339

  ld_last_update_date    date;
Line: 4356

        select term_id, price_list_id
        from oe_agreements_b
        where agreement_id = p_agreement_id;
Line: 4361

    select quote_status_id
    from aso_quote_statuses_vl
    where status_code = p_status_code;
Line: 4412

  IF(p_save_type <> OP_DELETE_CART) THEN
  IF (IBE_UTIL.G_DEBUGON = l_true) THEN
    IBE_UTIL.DEBUG('SAVE: Calling Validate User');
Line: 4416

  IBE_Quote_Misc_pvt.Validate_User_Update
   (  p_init_msg_list          => p_Init_Msg_List
     ,p_quote_header_id        => p_Qte_Header_Rec.quote_header_id
     ,p_party_id               => p_Qte_Header_Rec.party_id
     ,p_cust_account_id        => p_Qte_Header_Rec.cust_account_id
     ,p_quote_retrieval_number => p_sharee_Number
     ,p_validate_user          => FND_API.G_TRUE
     ,p_save_type              => p_save_type
     ,p_last_update_date       => p_Qte_Header_Rec.last_update_date
     ,x_return_status          => x_return_status
     ,x_msg_count              => x_msg_count
     ,x_msg_data               => x_msg_data    );
Line: 4449

  has not expired because we do not want to allow updates on expired carts*/
  l_is_quote_usable := IBE_QUOTE_MISC_PVT.is_quote_usable(p_qte_header_rec.quote_header_id,
                                                           p_Qte_Header_Rec.party_id,
                                                           p_Qte_Header_Rec.cust_account_id);
Line: 4462

                       ,p_auto_update_active_quote => p_auto_update_active_quote
                       ,x_qte_header_rec           => l_qte_header_rec
                       ,p_hdr_Payment_Tbl          => p_hd_payment_tbl
                       ,x_hdr_payment_tbl          => l_hd_Payment_Tbl
                       ,x_return_status            => x_return_status
                       ,x_msg_count                => x_msg_count
                       ,x_msg_data                 => x_msg_data );
Line: 4524

  /*This code validates the recipient's access level against the minimum required access level for a create/update
  operation which is "F"*/

  IF ( ( p_sharee_Number is not null)
       and ( p_sharee_Number <>  FND_API.G_MISS_NUM)) THEN

    l_privilege_type_code := IBE_Quote_Misc_pvt.GetShareeprivilege(l_qte_header_rec.quote_header_id
                                                                   ,p_sharee_Number);
Line: 4581

  /* Start of CREATE QUOTE or UPDATE QUOTE conditions*/
  /* "Create quote" is invoked if there is no incoming quote_header_id and no quote header id found
     in the database for the operating user, otherwise "Update quote" is invoked*/

  IF l_qte_header_rec.quote_header_id IS NULL
    OR l_qte_header_rec.quote_header_id = FND_API.G_MISS_NUM THEN

    --Fix for bug 2512597
    -- Force the quote_status_id to be 'STORE DRAFT' if there is no input value
    IF l_qte_header_rec.quote_status_id is null OR
      l_qte_header_rec.quote_status_id = fnd_api.g_miss_num then
       for rec_quote_sts_id in c_quote_sts_id('STORE DRAFT') loop
        l_qte_header_rec.quote_status_id := rec_quote_sts_id.quote_status_id;
Line: 4679

         IBE_Util.Debug('In Update Header MinisiteId Dynamic SQL');
Line: 4682

          l_upd_stmnt := 'Update ASO_QUOTE_HEADERS_ALL set minisite_id = :1
                    where quote_header_id = :2';
Line: 4692

              FND_MESSAGE.set_name('IBE', 'IBE_UPDATE_MSITE_HDR_ERR');
Line: 4768

            l_hd_payment_tbl(I).operation_code := 'UPDATE'; -- Bug# 1955991
Line: 4771

          l_hd_payment_tbl(I).last_update_date :=
             IBE_Quote_Misc_pvt.getQuoteLastUpdateDate(l_qte_header_rec.quote_header_id); -- Bug# 1955991
Line: 4793

      /* Added by Sri 09/06 since the header last update date should be the value in the db */
      l_qte_header_rec.last_update_date :=
      IBE_Quote_Misc_pvt.getQuoteLastUpdateDate(l_qte_header_rec.quote_header_id); -- Bug# 1955991
Line: 4806

          l_hd_shipment_tbl(I).operation_code := 'UPDATE';
Line: 4809

        l_hd_shipment_tbl(I).last_update_date :=
             IBE_Quote_Misc_pvt.getQuoteLastUpdateDate(l_qte_header_rec.quote_header_id); -- Bug# 1955991
Line: 4814

/* Added by Sri 09/06 since the header last update date should be the value in the db */
      l_qte_header_rec.last_update_date :=
      IBE_Quote_Misc_pvt.getQuoteLastUpdateDate(l_qte_header_rec.quote_header_id); -- Bug# 1955991
Line: 4870

       UpdateQuoteForSharee(
              p_api_version_number         => p_api_version_number
              ,p_init_msg_list             => FND_API.G_FALSE
                ,p_commit                    => FND_API.G_FALSE
              ,p_sharee_party_id           => p_sharee_party_id
              ,p_sharee_cust_account_id    => p_sharee_cust_account_id
              ,p_control_rec               => p_control_rec
              ,p_qte_header_rec            => l_qte_header_rec
              ,p_Hd_Price_Attributes_Tbl   => p_Hd_Price_Attributes_Tbl
              ,p_Hd_Payment_Tbl            => l_Hd_Payment_Tbl
              ,p_Hd_Shipment_Tbl           => l_Hd_Shipment_Tbl
              ,p_Hd_Tax_Detail_Tbl         => p_Hd_Tax_Detail_Tbl
              ,p_Hd_Freight_Charge_Tbl     => p_Hd_Freight_Charge_Tbl
              ,p_qte_line_tbl              => l_qte_line_tbl
              ,p_Qte_Line_Dtl_Tbl          => l_Qte_Line_Dtl_Tbl
              ,p_Line_rltship_tbl          => p_Line_rltship_tbl
              ,p_Line_Attr_Ext_Tbl         => p_Line_Attr_Ext_Tbl
              ,p_Ln_Price_Attributes_Tbl   => p_Ln_Price_Attributes_Tbl
              ,p_Ln_Payment_Tbl            => l_Ln_Payment_Tbl
              ,p_Ln_Shipment_Tbl           => p_Ln_Shipment_Tbl
              ,p_Ln_Tax_Detail_Tbl         => p_Ln_Tax_Detail_Tbl
              ,p_Ln_Freight_Charge_Tbl     => p_Ln_Freight_Charge_Tbl
              ,p_Price_Adj_Attr_Tbl        => p_Price_Adj_Attr_Tbl
              ,p_Price_Adjustment_Tbl      => p_Price_Adjustment_Tbl
              ,p_Price_Adj_Rltship_Tbl     => p_Price_Adj_Rltship_Tbl
              ,x_qte_header_rec            => x_qte_header_rec
              ,x_qte_line_tbl              => x_qte_line_tbl
              ,X_Return_Status             => X_Return_Status
              ,X_Msg_Count                 => X_Msg_Count
              ,X_Msg_Data                  => X_Msg_Data);
Line: 4933

      IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() starts');
Line: 4934

      IBE_Util.Debug('Save : COUNT: just before aso update' || p_Ln_Price_Attributes_Tbl.count);
Line: 4944

    ASO_Quote_Pub.Update_quote(
            P_Api_Version_Number       => P_Api_Version_Number
           ,P_Init_Msg_List            => FND_API.G_FALSE
           ,P_Commit                   => FND_API.G_FALSE
           ,P_Control_Rec              => p_control_rec
           ,P_qte_header_rec           => l_Qte_Header_Rec
           ,P_Qte_Line_Tbl             => l_Qte_Line_Tbl
            ,p_Line_rltship_tbl        => p_Line_rltship_tbl
            ,p_Qte_Line_Dtl_Tbl        => l_Qte_Line_Dtl_Tbl
            ,p_Hd_Price_Attributes_Tbl => p_Hd_Price_Attributes_Tbl
            ,p_Hd_Payment_Tbl          => l_Hd_Payment_Tbl
            ,p_Hd_Shipment_Tbl         => l_Hd_Shipment_Tbl
            ,p_Hd_Tax_Detail_Tbl       => p_Hd_Tax_Detail_Tbl
            ,p_Ln_Price_Attributes_Tbl => p_Ln_Price_Attributes_Tbl
            ,p_Ln_Payment_Tbl          => l_Ln_Payment_Tbl
            ,p_Ln_Shipment_Tbl         => p_Ln_Shipment_Tbl
            ,p_Ln_Tax_Detail_Tbl       => p_Ln_Tax_Detail_Tbl
            ,p_Price_Adj_Attr_Tbl      => p_Price_Adj_Attr_Tbl
            ,p_Price_Adjustment_Tbl    => p_Price_Adjustment_Tbl
            ,p_Price_Adj_Rltship_Tbl   => p_Price_Adj_Rltship_Tbl
            ,p_Line_Attr_Ext_Tbl       => p_Line_Attr_Ext_Tbl
            ,p_Hd_Freight_Charge_Tbl   => p_Hd_Freight_Charge_Tbl
            ,p_Ln_Freight_Charge_Tbl   => p_Ln_Freight_Charge_Tbl
            ,x_qte_header_rec          => x_Qte_Header_Rec
            ,X_Qte_Line_Tbl            => x_Qte_Line_Tbl
            ,X_Qte_Line_Dtl_Tbl        => x_Qte_Line_Dtl_Tbl
            ,x_Hd_Price_Attributes_Tbl => X_Hd_Price_Attributes_Tbl
            ,X_Hd_Payment_Tbl          => x_Hd_Payment_Tbl
            ,X_Hd_Shipment_Tbl         => x_Hd_Shipment_Tbl
            ,X_Hd_Freight_Charge_Tbl   => x_Hd_Freight_Charge_Tbl
            ,X_Hd_Tax_Detail_Tbl       => x_Hd_Tax_Detail_Tbl
            ,x_Line_Attr_Ext_Tbl       => x_Line_Attr_Ext_Tbl
            ,X_Line_rltship_tbl        => x_Line_Rltship_Tbl
            ,X_Price_Adjustment_Tbl    => x_Price_Adjustment_Tbl
            ,X_Price_Adj_Attr_Tbl      => X_Price_Adj_Attr_Tbl
            ,X_Price_Adj_Rltship_Tbl   => x_Price_Adj_Rltship_Tbl
            ,X_Ln_Price_Attributes_Tbl => X_Ln_Price_Attributes_Tbl
            ,X_Ln_Payment_Tbl          => x_Ln_Payment_Tbl
            ,X_Ln_Shipment_Tbl         => x_Ln_Shipment_Tbl
            ,X_Ln_Freight_Charge_Tbl   => x_Ln_Freight_Charge_Tbl
            ,X_Ln_Tax_Detail_Tbl       => x_Ln_Tax_Detail_Tbl
              ,X_Return_Status           => x_return_status
            ,X_Msg_Count               => x_msg_count
            ,X_Msg_Data                => x_msg_data);
Line: 4998

      IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() finishes : '|| x_return_status);
Line: 5005

  END IF;  -- end of create/update
Line: 5008

  x_last_update_date := x_qte_header_rec.last_update_date;
Line: 5031

     Set_Last_Update_Date(l_qte_header_rec.quote_header_id, x_last_update_date);
Line: 5041

     Set_Last_Update_Date(l_qte_header_rec.quote_header_id, x_last_update_date);
Line: 5051

     Set_Last_Update_Date(l_qte_header_rec.quote_header_id, x_last_update_date);
Line: 5066

PROCEDURE UpdateQuoteForSharee(
  p_api_version_number        IN   NUMBER
  ,p_init_msg_list            IN   VARCHAR2   := FND_API.G_FALSE
  ,p_commit                   IN   VARCHAR2    := FND_API.G_FALSE

  ,p_sharee_Party_Id          IN NUMBER
  ,p_sharee_Cust_account_Id   IN NUMBER
  ,p_changeowner              IN   VARCHAR2   := FND_API.G_FALSE

  ,P_Control_Rec              IN   ASO_Quote_Pub.Control_Rec_Type
  ,P_Qte_Header_Rec              IN   ASO_Quote_Pub.Qte_Header_Rec_Type
                                 := ASO_Quote_Pub.G_MISS_Qte_Header_Rec
  ,p_Hd_Price_Attributes_Tbl  in   ASO_Quote_Pub.Price_Attributes_Tbl_Type
                                 := ASO_Quote_Pub.G_MISS_Price_Attributes_Tbl
  ,p_Hd_Payment_Tbl                 in   ASO_Quote_Pub.Payment_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_PAYMENT_TBL
  ,p_Hd_Shipment_Tbl                in   ASO_Quote_Pub.Shipment_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_SHIPMENT_Tbl
  ,p_Hd_Tax_Detail_Tbl              in   ASO_Quote_Pub.TAX_DETAIL_TBL_TYPE
                                    := ASO_Quote_Pub.G_MISS_Tax_Detail_Tbl
  ,p_Hd_Freight_Charge_Tbl          in   ASO_Quote_Pub.Freight_Charge_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_Freight_Charge_Tbl

  ,p_qte_line_tbl                   in  ASO_Quote_Pub.Qte_Line_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_QTE_LINE_TBL
  ,p_Qte_Line_Dtl_Tbl               in   ASO_Quote_Pub.Qte_Line_Dtl_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_QTE_LINE_DTL_TBL
  ,p_Line_rltship_tbl               in   ASO_Quote_Pub.Line_Rltship_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_Line_Rltship_Tbl
  ,p_Line_Attr_Ext_Tbl              in   ASO_Quote_Pub.Line_Attribs_Ext_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_Line_Attribs_Ext_Tbl
  ,p_Ln_Price_Attributes_Tbl        in   ASO_Quote_Pub.Price_Attributes_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_Price_Attributes_Tbl
  ,p_Ln_Payment_Tbl                 in   ASO_Quote_Pub.Payment_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_PAYMENT_TBL
  ,p_Ln_Shipment_Tbl                in   ASO_Quote_Pub.Shipment_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_SHIPMENT_TBL
  ,p_Ln_Tax_Detail_Tbl              in   ASO_Quote_Pub.TAX_DETAIL_TBL_TYPE
                                    := ASO_Quote_Pub.G_MISS_Tax_Detail_Tbl
  ,p_Ln_Freight_Charge_Tbl          in   ASO_Quote_Pub.Freight_Charge_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_Freight_Charge_Tbl
  ,p_Price_Adj_Attr_Tbl             in   ASO_Quote_Pub.Price_Adj_Attr_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_PRICE_ADJ_ATTR_Tbl
  ,p_Price_Adjustment_Tbl           in   ASO_Quote_Pub.Price_Adj_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_Price_Adj_Tbl
  ,p_Price_Adj_Rltship_Tbl          in   ASO_Quote_Pub.Price_Adj_Rltship_Tbl_Type
                                    := ASO_Quote_Pub.G_MISS_Price_Adj_Rltship_Tbl

  ,x_qte_header_rec                 OUT NOCOPY  ASO_Quote_Pub.Qte_Header_Rec_Type
  ,x_qte_line_tbl                   OUT NOCOPY  ASO_Quote_Pub.Qte_Line_Tbl_Type
  ,X_Return_Status                  OUT NOCOPY  VARCHAR2
  ,X_Msg_Count                      OUT NOCOPY  NUMBER
  ,X_Msg_Data                       OUT NOCOPY  VARCHAR2
)
IS
  l_api_name                    CONSTANT VARCHAR2(30)    := 'UpdateQuoteForSharee';
Line: 5156

      IBE_Util.Debug('Begin IBE_Quote_Save_pvt.UpdateQuoteForSharee()');
Line: 5160

   SAVEPOINT    UpdateQuoteForSharee_pvt;
Line: 5202

     IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() starts');
Line: 5205

  ASO_Quote_Pub.Update_Quote(
     P_Api_Version_Number        => P_Api_Version_Number
          ,P_Init_Msg_List            => FND_API.G_FALSE
          ,P_Commit                => FND_API.G_FALSE
          ,P_Control_Rec            => p_control_rec
          ,P_qte_header_rec            => l_Qte_Header_Rec
          ,P_Qte_Line_Tbl            => p_Qte_Line_Tbl
            ,p_Line_rltship_tbl             => p_Line_rltship_tbl
            ,p_Qte_Line_Dtl_Tbl             => p_Qte_Line_Dtl_Tbl
            ,p_Hd_Price_Attributes_Tbl      => p_Hd_Price_Attributes_Tbl
            ,p_Hd_Payment_Tbl               => p_Hd_Payment_Tbl
            ,p_Hd_Shipment_Tbl              => p_Hd_Shipment_Tbl
            ,p_Hd_Tax_Detail_Tbl            => p_Hd_Tax_Detail_Tbl
            ,p_Ln_Price_Attributes_Tbl      => p_Ln_Price_Attributes_Tbl
            ,p_Ln_Payment_Tbl               => p_Ln_Payment_Tbl
            ,p_Ln_Shipment_Tbl              => p_Ln_Shipment_Tbl
            ,p_Ln_Tax_Detail_Tbl            => p_Ln_Tax_Detail_Tbl
            ,p_Price_Adj_Attr_Tbl           => p_Price_Adj_Attr_Tbl
            ,p_Price_Adjustment_Tbl         => p_Price_Adjustment_Tbl
            ,p_Price_Adj_Rltship_Tbl        => p_Price_Adj_Rltship_Tbl
            ,p_Line_Attr_Ext_Tbl            => p_Line_Attr_Ext_Tbl
            ,p_Hd_Freight_Charge_Tbl        => p_Hd_Freight_Charge_Tbl
            ,p_Ln_Freight_Charge_Tbl        => p_Ln_Freight_Charge_Tbl

          ,x_qte_header_rec            => x_Qte_Header_Rec
          ,X_Qte_Line_Tbl            => x_Qte_Line_Tbl
          ,X_Qte_Line_Dtl_Tbl            => lx_Qte_Line_Dtl_Tbl
            ,x_Hd_Price_Attributes_Tbl        => lX_Hd_Price_Attributes_Tbl
            ,X_Hd_Payment_Tbl            => lx_Hd_Payment_Tbl
            ,X_Hd_Shipment_Tbl            => lx_Hd_Shipment_Tbl
            ,X_Hd_Freight_Charge_Tbl        => lx_Hd_Freight_Charge_Tbl
            ,X_Hd_Tax_Detail_Tbl        => lx_Hd_Tax_Detail_Tbl
          ,x_Line_Attr_Ext_Tbl            => lx_Line_Attr_Ext_Tbl
          ,X_Line_rltship_tbl            => lx_Line_Rltship_Tbl
          ,X_Price_Adjustment_Tbl        => lx_Price_Adjustment_Tbl
            ,X_Price_Adj_Attr_Tbl        => lX_Price_Adj_Attr_Tbl
          ,X_Price_Adj_Rltship_Tbl        => lx_Price_Adj_Rltship_Tbl
            ,X_Ln_Price_Attributes_Tbl        => lX_Ln_Price_Attributes_Tbl
            ,X_Ln_Payment_Tbl            => lx_Ln_Payment_Tbl
            ,X_Ln_Shipment_Tbl            => lx_Ln_Shipment_Tbl
            ,X_Ln_Freight_Charge_Tbl        => lx_Ln_Freight_Charge_Tbl
            ,X_Ln_Tax_Detail_Tbl            => lx_Ln_Tax_Detail_Tbl
          ,X_Return_Status                => x_return_status
          ,X_Msg_Count                    => x_msg_count
          ,X_Msg_Data                     => x_msg_data);
Line: 5252

     IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() finishes');
Line: 5268

    l_qte_header_rec.last_update_date :=x_qte_header_rec.last_update_date;
Line: 5276

          IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() starts');
Line: 5279

       ASO_Quote_Pub.Update_quote(
          P_Api_Version_Number        => P_Api_Version_Number
          ,P_Init_Msg_List            => FND_API.G_FALSE
          ,P_Commit                => FND_API.G_FALSE
         ,P_qte_header_rec            => l_Qte_Header_Rec
          ,x_qte_header_rec            => x_Qte_Header_Rec
          ,X_Qte_Line_Tbl            => x_Qte_Line_Tbl
          ,X_Qte_Line_Dtl_Tbl            => lx_Qte_Line_Dtl_Tbl
            ,x_Hd_Price_Attributes_Tbl        => lX_Hd_Price_Attributes_Tbl
            ,X_Hd_Payment_Tbl            => lx_Hd_Payment_Tbl
            ,X_Hd_Shipment_Tbl            => lx_Hd_Shipment_Tbl
            ,X_Hd_Freight_Charge_Tbl        => lx_Hd_Freight_Charge_Tbl
            ,X_Hd_Tax_Detail_Tbl        => lx_Hd_Tax_Detail_Tbl
          ,x_Line_Attr_Ext_Tbl            => lx_Line_Attr_Ext_Tbl
          ,X_Line_rltship_tbl            => lx_Line_Rltship_Tbl
          ,X_Price_Adjustment_Tbl        => lx_Price_Adjustment_Tbl
            ,X_Price_Adj_Attr_Tbl        => lX_Price_Adj_Attr_Tbl
          ,X_Price_Adj_Rltship_Tbl        => lx_Price_Adj_Rltship_Tbl
            ,X_Ln_Price_Attributes_Tbl        => lX_Ln_Price_Attributes_Tbl
            ,X_Ln_Payment_Tbl            => lx_Ln_Payment_Tbl
            ,X_Ln_Shipment_Tbl            => lx_Ln_Shipment_Tbl
            ,X_Ln_Freight_Charge_Tbl        => lx_Ln_Freight_Charge_Tbl
            ,X_Ln_Tax_Detail_Tbl            => lx_Ln_Tax_Detail_Tbl
          ,X_Return_Status                => x_return_status
          ,X_Msg_Count                    => x_msg_count
          ,X_Msg_Data                     => x_msg_data);
Line: 5307

          IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() finishes');
Line: 5329

      IBE_Util.Debug('End   IBE_Quote_Save_pvt.UpdateQuoteForSharee()');
Line: 5334

      ROLLBACK TO UpdateQuoteForSharee_pvt;
Line: 5340

         IBE_Util.Debug('End   IBE_Quote_Save_pvt.UpdateQuoteForSharee()');
Line: 5344

      ROLLBACK TO UpdateQuoteForSharee_pvt;
Line: 5350

         IBE_Util.Debug('End   IBE_Quote_Save_pvt.UpdateQuoteForSharee()');
Line: 5354

      ROLLBACK TO UpdateQuoteForSharee_pvt;
Line: 5366

         IBE_Util.Debug('End   IBE_Quote_Save_pvt.UpdateQuoteForSharee()');
Line: 5369

END UpdateQuoteForSharee;
Line: 5410

  ,x_last_update_date         OUT NOCOPY  DATE
  ,X_Return_Status            OUT NOCOPY  VARCHAR2
  ,X_Msg_Count                OUT NOCOPY  NUMBER
  ,X_Msg_Data                 OUT NOCOPY  VARCHAR2
)

IS

  l_api_name                  CONSTANT VARCHAR2(30)   := 'getHdrDefaultValues';
Line: 5852

       select shipment_id, SHIP_TO_PARTY_SITE_ID
         from ASO_shipments
         where QUOTE_HEADER_ID = l_quote_header_id                 and
               quote_line_id is null;
Line: 5860

       select ship_to_party_id
         from ASO_shipments
         where QUOTE_HEADER_ID = l_quote_header_id                 and
               quote_line_id is null                               and
               SHIP_TO_CUST_ACCOUNT_ID is null                     and
               SHIP_TO_PARTY_SITE_ID is null;
Line: 5871

       select quote_header_id, INVOICE_TO_PARTY_SITE_ID
         from ASO_quote_headers
         where QUOTE_HEADER_ID = l_quote_header_id;
Line: 5878

       select invoice_to_party_id
         from ASO_quote_headers
         where QUOTE_HEADER_ID = l_quote_header_id                 and
               INVOICE_TO_CUST_ACCOUNT_ID is null                  and
               INVOICE_TO_PARTY_SITE_ID is null;
Line: 5920

                                                              opCode  = Update
         if shipTo_partyId is not null                     -> partyId = shipTo_partyId
         else
           there is shipment record but no shipTo_partyId  -> partyId = cookie's
     */

     IF (IBE_UTIL.G_DEBUGON = l_true) THEN
        IBE_Util.Debug('getDefaultAddress: l_party_id                       ='||l_party_id);
Line: 5968

             l_opCode      := 'UPDATE';
Line: 6008

             l_opCode := 'UPDATE';
Line: 6169

       select shipment_id, SHIP_METHOD_CODE
         from ASO_shipments
         where QUOTE_HEADER_ID = l_quote_header_id                 and
               quote_line_id is null;
Line: 6177

       SELECT msite_information1
         FROM ibe_msite_information m, wsh_carrier_ship_methods o, oe_system_parameters_all oesp
         WHERE m.msite_id                    = l_msite_id
           AND m.msite_information_context   = l_ship_mthd
           AND m.msite_information1          = o.ship_method_code
           AND oesp.org_id                   = l_org_id
           AND o.organization_id             = oesp.master_organization_id
           AND o.web_enabled                 = l_web_enabled
           AND o.enabled_flag                = l_enabled_flag
         Order by msite_information1;
Line: 6232

          l_opCode      := 'UPDATE';
Line: 6412

       select payment_id, PAYMENT_TYPE_CODE
         from ASO_payments
         where QUOTE_HEADER_ID = l_quote_header_id                 and
               quote_line_id is null;
Line: 6420

       SELECT msite_information1
         FROM ibe_msite_information a, fnd_lookup_values b
         WHERE a.msite_id                    = l_msite_id
           AND a.msite_information1          = b.lookup_code
           AND a.msite_information1          = 'CREDIT_CARD'
           AND b.LOOKUP_TYPE                 = 'IBE_PAYMENT_TYPE'
           AND b.ENABLED_FLAG                ='Y' AND (b.TAG='Y' or b.TAG is null)
           AND b.language                    = userenv('lang');
Line: 6432

       SELECT msite_information1
         FROM ibe_msite_information a, fnd_lookup_values b
         WHERE a.msite_id                    = l_msite_id
           AND a.msite_information1          = b.lookup_code
           AND a.msite_information1          <> 'CREDIT_CARD'
           AND b.LOOKUP_TYPE                 = 'IBE_PAYMENT_TYPE'
           AND b.ENABLED_FLAG                ='Y' AND (b.TAG='Y' or b.TAG is null)
           AND b.language                    = userenv('lang');
Line: 6485

          l_opCode      := 'UPDATE';
Line: 6699

       select tax_detail_id, tax_exempt_flag
         from ASO_TAX_DETAILS
         where QUOTE_HEADER_ID = l_quote_header_id                 and
               quote_line_id is null;
Line: 6747

          l_opCode        := 'UPDATE';
Line: 6815

       select quote_header_id, end_customer_party_id, end_customer_cust_party_id, end_customer_party_site_id, end_customer_cust_account_id
         from ASO_quote_headers
         where QUOTE_HEADER_ID = l_quote_header_id;
Line: 6822

       select SHIP_TO_CUST_ACCOUNT_ID, ship_to_party_id, ship_to_party_site_id
         from aso_shipments
         where QUOTE_HEADER_ID = l_quote_header_id and
               quote_line_id is null;
Line: 6998

  IBE_Quote_Misc_pvt.validate_user_update(
              p_init_msg_list            => p_Init_Msg_List
             ,p_quote_header_id         => p_quote_id
             ,p_party_id                 => p_party_id
             ,p_cust_account_id          => p_cust_account_id
             ,p_quote_retrieval_number   => p_quote_retrieval_number
             ,p_validate_user            => p_validate_user
             ,x_return_status         => x_return_status
             ,x_msg_count         => x_msg_count
             ,x_msg_data         => x_msg_data
             );
Line: 7065

      this is done because recipients cannot update a cart after it becomes a quote*/
      IF(IBE_UTIL.G_DEBUGON = 'Y') THEN
        IBE_UTIL.DEBUG('Calling share_readonly to downgrade the access levels of  all recipients to R status');
Line: 7164

          x_last_update_date   OUT NOCOPY Date                ,
          x_quote_header_id    OUT NOCOPY NUMBER              ,
          p_last_update_date   IN  Date                       ,
          p_quote_header_id    IN  NUMBER:= FND_API.G_MISS_NUM,
          p_party_id           IN  NUMBER:= FND_API.G_MISS_NUM,
          p_cust_account_id    IN  NUMBER:= FND_API.G_MISS_NUM,
          p_validate_user      IN  VARCHAR2:= FND_API.G_FALSE ,
          P_new_quote_name     IN  VARCHAR2                   ,
          p_retrieval_number   IN  NUMBER   := FND_API.G_MISS_NUM,
          p_minisite_id        IN  NUMBER ) is

  CURSOR  c_check_for_quote(c_quote_header_id NUMBER) IS
     SELECT count(*) is_published_quote
     FROM ASO_QUOTE_HEADERS_ALL
     WHERE quote_header_id = c_quote_header_id
       AND resource_id is not null
       AND publish_flag = 'Y';
Line: 7183

     select count(*) is_shared_cart
     from ibe_sh_quote_access
     where quote_header_id = c_quote_header_id;
Line: 7211

    SELECT order_type_id,currency_code
	 FROM aso_quote_headers
	WHERE quote_header_id = p_quote_header_id;
Line: 7223

  lx_last_update_date   DATE;
Line: 7240

     IBE_UTIL.DEBUG('DUPLICATE_CART: p_last_update_date = '||p_last_update_date);
Line: 7280

  IBE_Quote_Misc_pvt.Validate_User_Update
   (  p_init_msg_list   => p_Init_Msg_List
     ,p_quote_header_id => p_quote_header_id
     ,p_party_id        => p_party_id
     ,p_cust_account_id => p_cust_account_id
     ,p_validate_user   => p_validate_user
     ,p_quote_retrieval_number => p_retrieval_number
     ,p_save_type       => OP_DUPLICATE_CART
     ,p_last_update_date => p_last_update_date
     ,x_return_status   => lx_return_status
     ,x_msg_count       => lx_msg_count
     ,x_msg_data        => lx_msg_data
    );
Line: 7406

      ,x_last_update_date         => lx_last_update_date
      ,x_return_status            => x_return_status
      ,x_msg_count                => x_msg_count
      ,x_msg_data                 => x_msg_data
      );
Line: 7525

  ,x_last_update_date         OUT NOCOPY DATE
  ,x_return_status            OUT NOCOPY VARCHAR2
  ,x_msg_count                OUT NOCOPY NUMBER
  ,x_msg_data                 OUT NOCOPY VARCHAR2
) IS
  L_API_VERSION CONSTANT NUMBER       := 1.0;
Line: 7532

  lx_last_update_date   DATE;
Line: 7542

  l_refcursor_query VARCHAR2(1000) :=   'select aql.quote_header_id,
                                               aql.quote_line_id,
                                               aql.inventory_item_id,
                                               aql.organization_id,
	                                       aql.uom_code,
                                               aql.quantity,
	                                       aqld.config_header_id,
	                                       aqld.config_revision_num
                                        from aso_quote_lines_all aql,
                                             aso_quote_line_details AQLD
                                        where aqld.quote_line_id = aql.quote_line_id and
					      aqld.ref_line_id is null and
					      aql.quote_header_id = :1';
Line: 7661

           ,x_last_update_date            => x_last_update_date
           ,X_Return_Status               => x_return_status
           ,X_Msg_Count                   => x_msg_count
           ,X_Msg_Data                    => x_msg_data
           );
Line: 7683

    ,x_last_update_date        => lx_last_update_date
    ,X_Return_Status           => x_Return_Status
    ,X_Msg_Count               => x_Msg_Count
    ,X_Msg_Data                => x_Msg_Data
  );
Line: 7696

 l_Qte_Header_Rec.last_update_date := lx_last_update_date;
Line: 7803

  	SELECT primary_uom_code, service_duration_period_code, service_duration
	FROM mtl_system_items
	WHERE inventory_item_id = p_svc_item_id and organization_id = p_org_id;
Line: 7895

PROCEDURE UPDATE_SUPPORT_AND_QUANTITY(
	p_api_version        		IN  NUMBER,
    p_init_msg_list      		IN  VARCHAR2 := FND_API.G_FALSE,
    p_validation_level   		IN  NUMBER   := FND_API.G_VALID_LEVEL_FULL,
    x_return_status      		OUT NOCOPY VARCHAR2,
    x_msg_count          		OUT NOCOPY NUMBER,
    x_msg_data           		OUT NOCOPY VARCHAR2,

    p_quote_header_id			IN	NUMBER,
    p_quote_line_id_tbl			IN	JTF_NUMBER_TABLE := NULL,
    p_line_quantity_tbl			IN 	JTF_NUMBER_TABLE := NULL,
    p_new_service_id_tbl		IN 	JTF_NUMBER_TABLE := NULL,
   	p_organization_id           IN  NUMBER   := FND_API.G_MISS_NUM,

    p_party_id                  IN  NUMBER   := FND_API.G_MISS_NUM,
    p_cust_account_id           IN  NUMBER   := FND_API.G_MISS_NUM,
    p_sharee_number             IN  NUMBER   := FND_API.G_MISS_NUM,

   	p_minisite_id               IN  NUMBER   := FND_API.G_MISS_NUM,
   	p_price_list_id             IN  NUMBER   := FND_API.G_MISS_NUM,
   	p_currency_code             IN  VARCHAR2 := FND_API.G_MISS_CHAR,
	p_header_pricing_event      IN  VARCHAR2 := FND_API.G_MISS_CHAR,
   	p_save_type                 IN  NUMBER   := FND_API.G_MISS_NUM,
    p_last_update_date			IN 	DATE	:= FND_API.G_MISS_DATE,
    x_last_update_date			IN OUT	NOCOPY DATE
)
IS
  l_api_name	      	CONSTANT VARCHAR2(30) := 'UPDATE_SUPPORT_AND_QUANTITY';
Line: 7948

  l_deleted_svc_map_tbl	JTF_VARCHAR2_TABLE_100 := NULL;
Line: 7956

	SELECT AQL.quote_line_id,ALD.service_ref_line_id,AQL.inventory_item_id
	FROM aso_quote_lines_all AQL, aso_quote_line_details ALD
	WHERE AQL.quote_header_id = p_quote_header_id and AQL.quote_line_id=ALD.quote_line_id
		and AQL.item_type_code='SRV'
	ORDER BY ALD.service_ref_line_id,AQL.inventory_item_id;
Line: 7963

  	SELECT quote_line_id, quantity FROM aso_quote_lines_all
  	WHERE quote_header_id = p_quote_header_id and ITEM_TYPE_CODE='SVA'
  	ORDER BY quote_line_id;
Line: 7968

  	SELECT quantity FROM aso_quote_lines_all
  	WHERE quote_line_id = p_quote_line_id;
Line: 7972

  	SAVEPOINT UPDATE_SUPPORT_LEVEL_AND_QTY;
Line: 8034

			IBE_UTIL.debug('Need to update quantity');
Line: 8038

			IBE_UTIL.debug('No need to update quantity');
Line: 8056

	-- update quantities
	IF l_line_qty_size>0 THEN
		IF (IBE_UTIL.G_DEBUGON = FND_API.G_TRUE) THEN
			IBE_UTIL.debug('updating quantities, l_line_rec_index='||l_line_rec_index);
Line: 8065

			l_quote_line_tbl(l_line_rec_index).operation_code := 'UPDATE';
Line: 8074

			IBE_UTIL.debug('quantities updated, l_line_rec_index='||l_line_rec_index);
Line: 8077

		IBE_UTIL.debug('no quantity updated, l_line_rec_index='||l_line_rec_index);
Line: 8141

				IBE_UTIL.debug('checking if need to update quantity...');
Line: 8149

						l_quote_line_id_tbl.DELETE(i);
Line: 8150

						l_line_quantity_tbl.DELETE(i);
Line: 8191

			IF l_deleted_svc_map_tbl IS NULL THEN
			l_deleted_svc_map_tbl := JTF_VARCHAR2_TABLE_100();
Line: 8194

			l_deleted_svc_map_tbl.EXTEND;
Line: 8195

			l_deleted_svc_map_tbl(l_map_index) := 'DELETE';
Line: 8198

					IBE_UTIL.debug('populating l_deleted_svc_map_tbl table,l_map_index='||l_map_index);
Line: 8203

						l_deleted_svc_map_tbl(l_map_index) := 'KEEP'; -- keep the svc item
Line: 8207

						l_new_service_id_tbl.DELETE(i);
Line: 8214

					IBE_UTIL.debug('l_deleted_svc_map_tbl('||l_map_index||')='||l_deleted_svc_map_tbl(l_map_index));
Line: 8220

			IBE_UTIL.debug('applying l_deleted_svc_map_tbl table, service item='||rec_svc_line.inventory_item_id);
Line: 8221

			IBE_UTIL.debug('l_map_index='||l_map_index||', opcode='||l_deleted_svc_map_tbl(l_map_index));
Line: 8223

		IF l_deleted_svc_map_tbl(l_map_index) = 'DELETE' THEN
			IF (IBE_UTIL.G_DEBUGON = FND_API.G_TRUE) THEN
				IBE_UTIL.debug('deleting svc line, inventory_item_id='||rec_svc_line.inventory_item_id);
Line: 8227

			l_quote_line_tbl(l_line_rec_index).operation_code := 'DELETE';
Line: 8232

				IBE_UTIL.debug('svc line deleted, l_line_rec_index='||l_line_rec_index);
Line: 8288

						l_quote_line_id_tbl.DELETE(i);
Line: 8289

						l_line_quantity_tbl.DELETE(i);
Line: 8336

			IBE_UTIL.debug('nothing to update, returning...');
Line: 8365

	l_quote_header_rec.last_update_date := p_last_update_date;
Line: 8384

    	,p_auto_update_active_quote => FND_API.G_FALSE
    	,p_combinesameitem          => 1

    	,p_sharee_number            => p_sharee_number
    	,p_sharee_party_id          => l_sharee_party_id
    	,p_sharee_cust_account_id   => l_sharee_cust_account_id

    	,p_minisite_id              => p_minisite_id
    	,p_control_rec              => l_control_rec
    	,p_qte_header_rec           => l_quote_header_rec
    	,p_qte_line_tbl             => l_quote_line_tbl
    	,p_qte_line_dtl_tbl         => l_quote_line_dtl_tbl
	    ,p_save_type                => p_save_type
	    ,x_quote_header_id          => l_quote_header_id
	    ,x_last_update_date         => x_last_update_date
	    ,x_return_status            => x_return_status
    	,x_msg_count                => x_msg_count
	    ,x_msg_data                 => x_msg_data);
Line: 8405

		IBE_UTIL.debug('x_last_update_date='||x_last_update_date);
Line: 8413

      ROLLBACK TO UPDATE_SUPPORT_LEVEL_AND_QTY;
Line: 8420

      ROLLBACK TO UPDATE_SUPPORT_LEVEL_AND_QTY;
Line: 8427

      ROLLBACK TO UPDATE_SUPPORT_LEVEL_AND_QTY;
Line: 8435

END UPDATE_SUPPORT_AND_QUANTITY;