Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Payment Type, Shipper, Sales Partner to order candidate endpoint #5800

Open
metas-rc opened this issue Nov 19, 2019 · 0 comments
Open

Add Payment Type, Shipper, Sales Partner to order candidate endpoint #5800

metas-rc opened this issue Nov 19, 2019 · 0 comments

Comments

@metas-rc
Copy link
Member

@metas-rc metas-rc commented Nov 19, 2019

Is this a bug or feature request?

  • FR

What is the current behavior?

Which are the steps to reproduce?

What is the expected or desired behavior?

  • Add AD_InputDataSource.Value, AD_InputDataSource.ExternalId and AD_InputDataSource.URL
    • extent the rest-EP so that we can select the AD_InputDataSource via "Identifier" string. We already have this at many places incl olcand-Rest-API for bpartner, location and product. I would may that the inputsource could be specified in these ways:
      • 1000001 (i.e. the AD_InputDataSource_ID)
      • int-SOURCE.MSV3-server
      • ext-externalSuperServerName
      • val-inputdatasource-searchkey
    • ofc, also do the same for the "destination" AD_InputDataSource that we also have in the olcand-rest-EP
    • ❗️ EDIT: if the AD_InputDataSource can't be resolved, then trow a de.metas.rest_api.utils.MissingResourceException
  • Remove AD_InputDataSource.M_Product_ID and AD_InputDataSource.A_Asset_ID (because seemed tob be nice ideas at the time, but were never ever used in 10 years)
  • Take a look at the InputDataSource webui-Window, maybe give it a better name and, stuff, and all in all make sure it's accessible and works neatly for the user

Requirement

PaymentTypes

Dedicated payment info

  • extend JsonOLCandCreateRequest and add an optional property paymentInfo (new class JsonPaymentInfo)
  • might look like this:
"paymentInfo" : {
	amount: 23.00,
	currencyCode: "EUR",
	typeOfPayment: "BankTransfer",
	bankAccount: "val-RaibaAccount"
}

Notes:

  • with this info, metasfresh shall create a C_Payment and assign it to the C_Order (and later propagate the assignment also to C_Invoice)
  • bankAccount
    • is the account (in metasfresh) to which the payment is made
    • It shall also be an identifier-string, so:
      • can be <C_BP_BankAccount_ID> or <val-C_BP_BankAccount.Value>
      • add C_BP_BankAccount.Value
      • if the C_BP_BankAccount isn't found, throw de.metas.rest_api.utils.MissingResourceException

paypal

We will very probably later extend this JSON to have additional typeOfPayments; the first one will be something like PayPal and come with some sort of paypal related token string.

Vorkasse

in metasfresh it's not a PaymentType at all, but a DocumentType. Meaning with a "Vorkasse" sales order, metasfresh doesn't care how you paid it (Paypal etc), just that you paid it

TODO:

  • extend JsonOLCandCreateRequest and add an optional property orderDocType
  • enum with values
    • SalesOrder
    • PrepaySalesOrder
  • Make sure it's propagated to the order(s) by OLCandPRocessor (and not overwritten by the processor's default value!)

"Auf Rechnung", "Kreditkarte" and "Paypal"

  • extend JsonOLCandCreateRequest and add an optional property paymentRule (that's the metasfresh-terminology)
  • enum with values
    • NOT CreditCard = "K" (<= not supported in metasfresh)
    • PayPal = "L"
    • OnCredit = "P";

SalesPartnerCode

Extend JsonOLCandCreateRequest and add an optional property salesPartnerCode

  • String
  • shall be resolved in C_OLCand, i.e. we also need C_OLCand.C_BPartner_SalesRep_ID (as we have in C_Order)
  • the EP shall resolve the C_BPartner_SalesRep_ID and trow a de.metas.rest_api.utils.MissingResourceException if there is no (or multiple!) bpartner's
  • shall be propagated to C_Order

Shipper

Extend JsonOLCandCreateRequest and add an optional property shipper

  • String
  • Identifier-string, just like e.g. product. so it can be val-<M_Shipper.Value> or <M_Shipper_ID>
  • btw: add Value ("Suchschlüssel") to M_Shipper
  • Resolve it; if there is no matching M_Shipper, then throw a de.metas.rest_api.utils.MissingResourceException
metas-rc added a commit that referenced this issue Nov 20, 2019
metas-rc added a commit that referenced this issue Nov 20, 2019
metas-rc added a commit that referenced this issue Nov 20, 2019
metas-rc added a commit that referenced this issue Nov 20, 2019
metas-rc added a commit that referenced this issue Nov 20, 2019
metas-rc added a commit that referenced this issue Nov 20, 2019
metas-rc added a commit that referenced this issue Nov 20, 2019
metas-rc added a commit that referenced this issue Nov 20, 2019
metas-rc added a commit that referenced this issue Nov 21, 2019
metas-rc added a commit that referenced this issue Nov 21, 2019
metas-rc added a commit that referenced this issue Nov 21, 2019
metas-rc added a commit that referenced this issue Nov 21, 2019
metas-rc added a commit that referenced this issue Nov 21, 2019
metas-rc added a commit that referenced this issue Nov 21, 2019
(not finished)
#5800
metas-rc added a commit that referenced this issue Nov 22, 2019
metas-rc added a commit that referenced this issue Nov 29, 2019
metas-rc added a commit that referenced this issue Dec 2, 2019
metas-rc added a commit that referenced this issue Dec 2, 2019
metas-rc added a commit that referenced this issue Dec 2, 2019
metas-rc added a commit that referenced this issue Dec 9, 2019
metas-rc added a commit that referenced this issue Dec 9, 2019
metas-rc added a commit that referenced this issue Dec 9, 2019
metas-rc added a commit that referenced this issue Dec 9, 2019
metas-rc added a commit that referenced this issue Dec 9, 2019
metas-rc added a commit that referenced this issue Dec 9, 2019
metas-rc added a commit that referenced this issue Dec 10, 2019
metas-rc added a commit that referenced this issue Dec 10, 2019
metas-rc added a commit that referenced this issue Dec 10, 2019
metas-rc added a commit that referenced this issue Dec 10, 2019
metas-rc added a commit that referenced this issue Dec 10, 2019
metas-rc added a commit that referenced this issue Dec 11, 2019
metas-rc added a commit that referenced this issue Dec 12, 2019
This reverts commit d9adc21.
metas-rc added a commit that referenced this issue Dec 12, 2019
metas-rc added a commit that referenced this issue Dec 12, 2019
metas-ts added a commit that referenced this issue Dec 12, 2019
#5800 set the postal when creating a location
metas-ts added a commit that referenced this issue Dec 16, 2019
  * [#5800](#5800) Add Payment Type, Shipper, Sales Partner to order candidate endpoint
  * [#5856](#5856) Add payment rest endpoint
  * [#5865](#5865) Picklist not working: "Type not supported: UNALLOCABLE"
  * [#5887](#5887) Additional Invoice Information
  * [#5888](#5888) Picklist ordered by locator name + dimensions
  * [#5895](#5895) Create Window for managing Manufactoring Workflow
  * [#5900](#5900) product proposals: Copy product price from other price list shall set IsInvalidPrice=N
  * [#5901](#5901) Automatically create C_ValidCombination(s) when a new C_ElementValue is created
  * [#5906](#5906) Add poreference field in the sql function to get data for sales order report
  * [#5908](#5908) SQL Process for BPartner Products as Excel List
  * [#5912](#5912) Read documentno field in the report for customer invoice with credit memo
  * [#5917](#5917) Product price not found if ASI was added to order line
  * [#1330](metasfresh/metasfresh-webui-api#1330) Reduce the number of websocket events we are sending to frontend
  * [#2469](metasfresh/metasfresh-webui-frontend#2469) Re-fetch tab's actions when the document status changes
  * [#2436](metasfresh/metasfresh-webui-frontend#2436) Follow-Up: Customer Proposal List navigation with arrow keys (qty arrows out)
  * [#5903](#5903) Fix country code from de_metas_endcustomer_fresh_reports.Docs_Sales_Invoice_Root
  * [#2471](metasfresh/metasfresh-webui-frontend#2471) Attributes cannot be set in orderline grid view
  * [#2477](metasfresh/metasfresh-webui-frontend#2477) Location name seems to get lost when editing the location
  * [#2488](metasfresh/metasfresh-webui-frontend#2488) Add new button doesn't work anymore
metas-rc added a commit that referenced this issue Dec 20, 2019
metas-ts added a commit that referenced this issue Dec 20, 2019
#5800 Support PaymentRule = DirectDebit in OLCand EndPoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.