|
Sets the default supplier and the related properties of the current article card. |
|
 |
void SetDefaultSupplier ( LONG lSupNumber ) |
|
|
Parameters | lSupNumber | [in] The number of the supplier you want to use as the default. | | Remarks |
 | If an article supplier card (see ArtSup-interface) exist for the article and the given supplier,
not only the property pSupNumber is changed but the following properties are also copied from the
ArtSup-record:
 |
 |
pPurchasePrice |
 |
 |
pPurchasePriceDate |
 |
 |
pTermOfDelivery |
 |
 |
pPurchInfo |
 |
 |
pSupRef |
 |
 |
pCurrencyCode |
 |
 |
pComDiscountPrc |
 |
 |
pFinDiscountPrc |
If no article supplier card (see ArtSup-interface) exist for the article and the given supplier,
but the supplier card (see Suppl-interface) exists, not only the property pSupNumber is changed but also the following properties are changed:
 |
 |
pPurchasePrice is set to 0.0 |
 |
 |
pPurchasePriceDate is set to the 0-date for COM (i.e. 30/12/1899). |
 |
 |
pCurrencyCode is copied from the supplier card |
|
 | This method does not update the physical record, it only updates the current record buffer. |
 | This method throws an exception if the given supplier does not exist. |
|
|
See Also |
|
|
|
Samples |
|
 |
C++ |
|
// Set the default supplier for the article with number 'Art_001' to supplier with number 125
if (pArtcl->SeekByNumber (smEqual, "Art_001"))
pArtcl->SetDefaultSupplier (125);
|
|
 |
C# |
|
// Set the default supplier for the article with number 'Art_001' to supplier with number 125
if (oArtcl.SeekByNumber (eSeekMode.smEqual, "Art_001"))
oArtcl.SetDefaultSupplier (125);
|
|
 |
VBS |
|
' Set the default supplier for the article with number 'Art_001' to supplier with number 125
If oArtcl.SeekByNumber(smEqual, "Art_001") Then
Call oArtcl.SetDefaultSupplier(125)
End If
|
|
 |
VB.NET |
|
' Set the default supplier for the article with number 'Art_001' to supplier with number 125
If oArtcl.SeekByNumber(eSeekMode.smEqual, "Art_001") Then
Call oArtcl.SetDefaultSupplier(125)
End If
|
|